aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'storage/filesystem')
-rw-r--r--storage/filesystem/internal/dotgit/writers.go2
-rw-r--r--storage/filesystem/shallow.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/storage/filesystem/internal/dotgit/writers.go b/storage/filesystem/internal/dotgit/writers.go
index e0a41a8..531259b 100644
--- a/storage/filesystem/internal/dotgit/writers.go
+++ b/storage/filesystem/internal/dotgit/writers.go
@@ -236,7 +236,7 @@ func (s *syncedReader) Seek(offset int64, whence int) (int64, error) {
}
p, err := s.r.Seek(offset, whence)
- s.read = uint64(p)
+ atomic.StoreUint64(&s.read, uint64(p))
return p, err
}
diff --git a/storage/filesystem/shallow.go b/storage/filesystem/shallow.go
index ec8d20e..107818c 100644
--- a/storage/filesystem/shallow.go
+++ b/storage/filesystem/shallow.go
@@ -36,7 +36,7 @@ func (s *ShallowStorage) SetShallow(commits []plumbing.Hash) error {
// Shallow return the shallow commits reading from shallo file from .git
func (s *ShallowStorage) Shallow() ([]plumbing.Hash, error) {
f, err := s.dir.Shallow()
- if err != nil {
+ if f == nil || err != nil {
return nil, err
}