]> git.ipfire.org Git - thirdparty/git.git/commit - sequencer.c
sequencer: delete REBASE_HEAD in correct repo when picking commits
authorPatrick Steinhardt <ps@pks.im>
Fri, 19 Jan 2024 10:40:04 +0000 (11:40 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jan 2024 19:10:41 +0000 (11:10 -0800)
commitbb02e95f3b25d933272bcf9d6883828d26271f69
treee06d8d58cd0654209b25de8e18adb0bba0f0b63f
parent821f6632b091dc59562f74a0c74005b34319a2e7
sequencer: delete REBASE_HEAD in correct repo when picking commits

When picking commits, we delete some state before executing the next
sequencer action on interactive rebases. But while we use the correct
repository to calculate paths to state files that need deletion, we use
the repo-less `delete_ref()` function to delete REBASE_HEAD. Thus, if
the sequencer ran in a different repository than `the_repository`, we
would end up deleting the ref in the wrong repository.

Fix this by using `refs_delete_ref()` instead.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c