summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-12-11 10:07:54 +0100
committerJunio C Hamano <gitster@pobox.com>2023-12-11 07:23:16 -0800
commit3054fbd93edb5f12c1a320dfb6abec139bdf9628 (patch)
treecfc459054905833a55035b5eeea760daefc49b09 /builtin/commit.c
parentd779996a1087747886853f4e73cff920c09ab1a2 (diff)
reftable/stack: fix stale lock when dying
When starting a transaction via `reftable_stack_init_addition()`, we create a lockfile for the reftable stack itself which we'll write the new list of tables to. But if we terminate abnormally e.g. via a call to `die()`, then we do not remove the lockfile. Subsequent executions of Git which try to modify references will thus fail with an out-of-date error. Fix this bug by registering the lock as a `struct tempfile`, which ensures automatic cleanup for us. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions