]> git.ipfire.org Git - thirdparty/git.git/commit
sequencer: clean up pseudo refs with REF_NO_DEREF
authorPatrick Steinhardt <ps@pks.im>
Fri, 19 Jan 2024 10:39:59 +0000 (11:39 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jan 2024 19:10:40 +0000 (11:10 -0800)
commit821f6632b091dc59562f74a0c74005b34319a2e7
treec29abf0250e249dcb56697fef348870393739afc
parent186b115d3062e6230ee296d1ddaa0c4b72a464b5
sequencer: clean up pseudo refs with REF_NO_DEREF

When cleaning up the state-tracking pseudorefs CHERRY_PICK_HEAD or
REVERT_HEAD we do not set REF_NO_DEREF. In the unlikely case where those
refs are a symref we would thus end up deleting the symref targets, and
not the symrefs themselves.

Harden the code to use REF_NO_DEREF to fix this.

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