From: Ben Knoble Date: Tue, 27 Oct 2026 13:37:16 GMT Subject: Re: [PATCH v2 0/3] reflog: add --operations and --historical-branch Message-ID: In-Reply-To: <1bc5a05e-3d3b-4f56-8b11-2e276cef48ca@gmail.com> > Le 26 oct. 2026 à 06:53, Phillip Wood a écrit : > > On 24/10/2026 17:40, Junio C Hamano wrote: >> Phillip Wood 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?