aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/dotgit/writers_test.go
diff options
context:
space:
mode:
authorJavier Alvarez Garcia <ja@daedalean.ai>2024-06-17 19:10:33 +0200
committerJavier Alvarez <javier.alvarez@allthingsembedded.net>2024-06-29 01:46:58 +0200
commit101c1ab3deb100eb9522c689bc8bdaa0728373fd (patch)
tree306cd4cd24b882243cff0bda190d059aa8382023 /storage/filesystem/dotgit/writers_test.go
parent1e72372fced2c3b5300f1408e6e71b1a50adc6e3 (diff)
downloadgo-git-101c1ab3deb100eb9522c689bc8bdaa0728373fd.tar.gz
storage: Fix reference updated concurrently error for the filesystem storer
If a reference exists in the packed refs file but not in the actual refs folder, we need to fall back to reading the pack refs file when storing the reference. This happens because by the time we are storing the reference, we open the file with write permissions and read from it. At that point, if the file is empty, we still need to read the valid reference. Otherwise, it will read 0, and assume that the references do not match (because the old value was read from the packed file).
Diffstat (limited to 'storage/filesystem/dotgit/writers_test.go')
0 files changed, 0 insertions, 0 deletions