aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-06-27 10:14:27 -0700
committerGitHub <noreply@github.com>2017-06-27 10:14:27 -0700
commitce6f5b7c82fc6c2c4d41880ed6b26f921dd9c1c3 (patch)
treef954b632f20c8bcb0c5b9358b0c0500340a4eaa6 /storage/filesystem
parent2d02297a9156390d1a23584bd9d9833c65998f40 (diff)
parentc9f5acc2d10ef8c20194ce25bffb1e204b18bfdf (diff)
downloadgo-git-ce6f5b7c82fc6c2c4d41880ed6b26f921dd9c1c3.tar.gz
Merge pull request #453 from smola/race
fix race on packfile writer, fixes #351
Diffstat (limited to 'storage/filesystem')
-rw-r--r--storage/filesystem/internal/dotgit/writers.go2
1 files changed, 1 insertions, 1 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
}