diff options
author | Javier Alvarez Garcia <ja@daedalean.ai> | 2024-06-17 19:10:33 +0200 |
---|---|---|
committer | Javier Alvarez <javier.alvarez@allthingsembedded.net> | 2024-06-29 01:46:58 +0200 |
commit | 101c1ab3deb100eb9522c689bc8bdaa0728373fd (patch) | |
tree | 306cd4cd24b882243cff0bda190d059aa8382023 /status.go | |
parent | 1e72372fced2c3b5300f1408e6e71b1a50adc6e3 (diff) | |
download | go-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 'status.go')
0 files changed, 0 insertions, 0 deletions