From: Phillip Wood Date: Mon, 15 Sep 2025 14:10:50 GMT Subject: Re: [PATCH RFC v3 02/18] sequencer: add option to rewind HEAD after picking commits Message-ID: <66e9aa8d-762e-4f51-b049-347b76578bf9@gmail.com> In-Reply-To: On 15/09/2025 10:32, Patrick Steinhardt wrote: > On Wed, Sep 10, 2025 at 03:04:00PM +0100, Phillip Wood wrote: >> Hi Patrick >> >> On 04/09/2025 15:27, Patrick Steinhardt wrote: > > You probably refer to the condition in `sequencer_pick_revisions()` > here? Everything else is basically new code. I was thinking of the code that restores HEAD at the end of pick_commits() as rebase does something similar already (it looks like you're using the same reflog message). Though thinking about it again I'm not sure if "git history" detaches HEAD at the start like rebase does. Rewriting the history with a detached HEAD is probably a good idea as it will stop the branch reflog being polluted. One nice aspect of rebase detaching HEAD is that at the end you can check the result by running git range-diff $branch@{1}...HEAD Thanks Phillip