Re: [PATCH v2 0/3] reflog: add --operations and --historical-branch
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- Oct 25, 2026, 18:52 UTC
- Message-ID
- <fc4d4a00-bc3a-4e1a-939c-f3a68fd8ce08@app.fastmail.com>
- In-Reply-To
- <CAHwyqnVJ618QXq99M=XNm19eEObQC-DTLcpeYOiizzSu_YNEpw@mail.gmail.com>
On Sat, Oct 24, 2026, at 20:46, Harald Nordgren wrote:
Show 22 quoted lines
> On Sat, Oct 24, 2026 at 6:40 PM Junio C Hamano <gitster@pobox.com> 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.
>>
>>[snip]
>>
>> By the way, I too was annoyed that 'git reflog' defaults to the log
>> of HEAD a long time ago, but the irritation soon waned once I made
>> it a habit to always provide @{now} or @{0} to the command, as that
>> notation refers to the current branch.
>
> Thanks Phillip, Ben and Junio for pointing this out!
>
> I didn't realize that reflog could be changed to operate only on one
> branch. And it makes it a lot better! Seems like it should be the
> default, and I don't think a lot of people would complain, I'll
> certainly never run the old reflog again.Well. I wrote in this thread:
> That you rebase many commits and then the reset points (where each one > started and ended) get obscured in the reflog is classic for me. And I > think many have had the same issue.
But now I wonder if that was just an illusion:
$ # The rebase was for five commits
$ git reflog --no-decorate test-branch
0e77d8619b8 test-branch@{0}: rebase (finish): refs/heads/test-branch onto 7e34d8174dcda3435d1404c9a30bef46afe6c13e
d1bcad06e24 test-branch@{1}: branch: Created from HEADI have always known about per-branch reflogs and that `HEAD` has its own, but maybe I was too much in the habit of running without the branch name after rebases?
So maybe my use case was fine all along. But that still leaves Patrick’s[1] problems with it.
[1] https://lore.kernel.org/git/akZfm-igZKeHaDST@pks.im/
Show 5 quoted lines
> > However, the format is quite heavy with the full name references, > seems like they could be cleaned up: > >[snip]