Re: [PATCH 1/7] sequencer: clean up pseudo refs with REF_NO_DEREF
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jan 22, 2024, 11:49 UTC
- Message-ID
- <CAOLa=ZQakWpRgFZdLnALq9f+acAR3hBwgO_kxJ6gb_yv+vrX=g@mail.gmail.com>
- In-Reply-To
- <48b95fe954c1dbdd080ce7a0cc871f4850bddeae.1705659748.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 7 quoted lines
> 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. >
Just a question for my understanding. Is that that currently CHERRY_PICK_HEAD or REVERT_HEAD are never symrefs, so we don't really worry about this, but adding this change makes it safer?