Re: [PATCH v2 0/3] reflog: add --operations and --historical-branch
- From
Ben Knoble <ben.knoble@gmail.com>
- Date
- Oct 27, 2026, 13:37 UTC
- Message-ID
- <B734A6B4-CEA6-4CF2-8BA0-A4D8CC4125C1@gmail.com>
- In-Reply-To
- <1bc5a05e-3d3b-4f56-8b11-2e276cef48ca@gmail.com>
Show 16 quoted lines
> Le 26 oct. 2026 à 06:53, Phillip Wood <phillip.wood123@gmail.com> a écrit : > > On 24/10/2026 17:40, Junio C Hamano wrote: >> Phillip Wood <phillip.wood123@gmail.com> writes: >>> I'm rather skeptical of this in its current form. Not all commands that >>> modify the working tree update the reflog and some commands such as "git >>> cherry-pick A B C" create multiple reflog entires that are >>> indistinguishable from multiple invocations of a single command. >> I like the direction to make the default 'git reflog' output on a >> single branch easier to understand without needing any extra >> filtering in this series. >> 'git rebase' doing its work on a detached HEAD was likely the >> first, and we may want to convert more multi-step commands to do >> so, including the multiple 'git cherry-pick' you mention. > > It would certainly be nice to avoid creating lots of entries in the branch reflog when cherry-picking. I'm not sure what users would make of us switching to a detached HEAD as some people seem to find it confusing; if we do decide to do that we should make sure we update "git status" to explain what's happening. I'm more relaxed about changing "git am", but like you I normally detach HEAD first so maybe I'm not the best person to ask about that.
I sometimes forget that Git detaches HEAD while rebasing! The prompt script shows the branch info, and git status (I think?) doesn’t indicate it.
All this to say, I think rebase’s presentation of a detached HEAD that is somewhat « hidden » might make such a change more invisible to cherry-pickers?