diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-01-20 09:47:10 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-01-20 09:47:10 +0300 |
commit | 266921418ebf81aa71d64d8f417f13eacc10aff4 (patch) | |
tree | c290a0cd7ee4855ddb02f97b4dba13f7a107d968 /Makefile | |
parent | 96f32d09ba110880d767a413ad302e2f9f1ffd17 (diff) |
git: Upgrade Git to correctly sync packed-refs to disk
At GitLab we have recently received a report where a repository was left
with a corrupted `packed-refs` file after the node hard-crashed even
though `core.fsync=reference` was set. This is something that in theory
should not happen if we correctly did the atomic-rename dance. So even
if we crash in the middle of writing the `packed-refs` file we should
only ever see either the old or the new state of the file.
And while we do the dance when writing the `packed-refs` file, there is
indeed one gotcha: we use a `FILE *` stream to write the temporary file,
but don't flush it before synchronizing it to disk. As a consequence any
data that is still buffered will not get synchronized and a crash of the
machine may cause corruption.
We have upstreamed a fix into Git v2.39.0 and backported that fix to Git
v2.38.3.gl2. So let's upgrade our Git version to fix this bug.
Changelog: fixed
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -133,7 +133,7 @@ GIT_EXECUTABLES += git-http-backend ## tags, branches, and commit ids. GIT_VERSION ?= ## The Git version used for bundled Git v2.38. -GIT_VERSION_2_38 ?= v2.38.3.gl1 +GIT_VERSION_2_38 ?= v2.38.3.gl2 ## Skip overriding the Git version and instead use the Git version as specified ## in the Git sources. This is required when building Git from a version that |