Volume XXII, number 279Tuesday, October 6, 2026Latest message 14 minutes ago

The Git List

News and archive of git@vger.kernel.org, since April 2005

Bugreport

9 messages between Aug 12, 2026 and Aug 13, 2026, from Marcel Svitalský, Kristoffer Haugsbakk, D. Ben Knoble, Junio C Hamano.

Plain Markdown or JSON for tools and agents.

Marcel SvitalskýAug 12, 2026, 12:31 UTC on lore

What did you do before the bug happened? (Steps to reproduce your issue) I called `git lg` command to display git graph log in my terminal. The command is defined in my general gitconfig file as follows:

# double liner with hash, time, branches and tags on first line and the message on second lg = "!f() { num=15; if [ \"$1\" != \"\" ] && ( echo \"$1\" | grep -q \"^[0-9]\\\\+\\$\" ) ; then num=\"$1\" ; shift ; fi ; [ $num -eq 0 ] && num=999999999 ; git \"$@\" log -n \"$num\" --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)' --all; }; f"

What did you expect to happen? (Expected behavior) I expected to see git graph log with the project commits.

What happened instead? (Actual behavior) On top of the project commits were added these four pseudo-commits made by some Git component(s).

* f7b611ce - Wed, 12 Aug 2026 09:26:03 +0200 (5 hours ago)
|  Notes added by 'git notes append' - rewrite-analytics
* 1a7605bb - Wed, 12 Aug 2026 09:26:03 +0200 (5 hours ago)
|  Notes added by 'git notes append' - rewrite-analytics
* c2a05d79 - Wed, 12 Aug 2026 09:25:03 +0200 (5 hours ago)
|  Notes added by 'git notes append' - rewrite-analytics
  \
   * 01c630e0 - Wed, 12 Aug 2026 09:13:00 +0200 (5 hours ago)
      chatter: initialize notes ref - chatter

They are not graphically connected with the actual commits, they just sit there over them. No other graphical tool (Sublime Merge, IntelliJ Idea) displays them. Originally, when I opened the project, only the first (chronologically) commit (by chatter) appeared, and those by rewrite-analytics seem to be added with actual commits in branches, each for one branch. Sometimes after more commits or merges they disappear and after removing (`git reset --hard`) those new commits/merges they re-appear (I played with it a little). They are not always on top, sometimes when a new commit in a branch is made it gets on top and these pseudo-commits sit beside (to the right) of the graph log, still unconnected.

What's different between what you expected and what actually happened? Those pseudo-commits.

Anything else you want to add: The terminal is tmux running on mate-terminal.

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info]
git version:
git version 2.55.0.559.g11c6700f10
cpu: x86_64
built from commit: 11c6700f10234578d10523faf35656ca491425c9
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
rust: enabled
feature: fsmonitor--daemon
gettext: enabled
libcurl: 8.21.0
OpenSSL: OpenSSL 3.6.3 9 Jun 2026
zlib: 1.3.2
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1
uname: Linux 7.1.6-1-MANJARO #1 SMP PREEMPT_DYNAMIC Mon, 03 Aug 2026 
10:34:01 +0000 x86_64
compiler info: gnuc: 16.1
libc info: glibc: 2.44
$SHELL (typically, interactive shell): /bin/bash
[Enabled Hooks]
Kristoffer HaugsbakkAug 12, 2026, 12:54 UTC in reply to Marcel Svitalský on lore

Re: Bugreport

I have only skimmed this.
On Wed, Aug 12, 2026, at 14:31, Marcel Svitalský wrote:
Show 13 quoted lines
> What did you do before the bug happened? (Steps to reproduce your issue)
> I called `git lg` command to display git graph log in my terminal. The
> command is defined in my
> general gitconfig file as follows:
>
> # double liner with hash, time, branches and tags on first line and the
> message on second
> lg = "!f() { num=15; if [ \"$1\" != \"\" ] && ( echo \"$1\" | grep -q
> \"^[0-9]\\\\+\\$\" ) ; then num=\"$1\" ; shift ; fi ; [ $num -eq 0 ] &&
> num=999999999 ; git \"$@\" log -n \"$num\" --graph --abbrev-commit
> --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold
> cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold
> yellow)%d%C(reset)%n'' %C(white)%s%C(reset)' --all; }; f"
Note the `--all`.
Show 20 quoted lines
> What did you expect to happen? (Expected behavior)
> I expected to see git graph log with the project commits.
>
> What happened instead? (Actual behavior)
> On top of the project commits were added these four pseudo-commits made
> by some Git component(s).
>
> * f7b611ce - Wed, 12 Aug 2026 09:26:03 +0200 (5 hours ago)
> |  Notes added by 'git notes append' - rewrite-analytics
> * 1a7605bb - Wed, 12 Aug 2026 09:26:03 +0200 (5 hours ago)
> |  Notes added by 'git notes append' - rewrite-analytics
> * c2a05d79 - Wed, 12 Aug 2026 09:25:03 +0200 (5 hours ago)
> |  Notes added by 'git notes append' - rewrite-analytics
>   \
>    * 01c630e0 - Wed, 12 Aug 2026 09:13:00 +0200 (5 hours ago)
>       chatter: initialize notes ref - chatter
>
> They are not graphically connected with the actual commits, they just
> sit there over them. No other graphical
> tool (Sublime Merge, IntelliJ Idea) displays them.

They are Git notes. They form their own connected graph. That’s why they are not connected with the “actual commits” like from some branch.

The `--all` will include all refs, including Git notes like `refs/notes/commits`.

This doesn’t look like a bug.
>[snip]
Marcel SvitalskýAug 12, 2026, 12:59 UTC in reply to Kristoffer Haugsbakk on lore

Re: Bugreport

I see, thank you. Is this a new feature? I've been using this command for years and today is the first time I am seeing this. Also, is there another flag instead of `--all` that would just include the actual commits only?

Thank you, best regards Marcel Svitalský

On 12/08/2026 14:54, Kristoffer Haugsbakk wrote:
Show 47 quoted lines
> I have only skimmed this.
>
> On Wed, Aug 12, 2026, at 14:31, Marcel Svitalský wrote:
>> What did you do before the bug happened? (Steps to reproduce your issue)
>> I called `git lg` command to display git graph log in my terminal. The
>> command is defined in my
>> general gitconfig file as follows:
>>
>> # double liner with hash, time, branches and tags on first line and the
>> message on second
>> lg = "!f() { num=15; if [ \"$1\" != \"\" ] && ( echo \"$1\" | grep -q
>> \"^[0-9]\\\\+\\$\" ) ; then num=\"$1\" ; shift ; fi ; [ $num -eq 0 ] &&
>> num=999999999 ; git \"$@\" log -n \"$num\" --graph --abbrev-commit
>> --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold
>> cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold
>> yellow)%d%C(reset)%n'' %C(white)%s%C(reset)' --all; }; f"
> Note the `--all`.
>
>> What did you expect to happen? (Expected behavior)
>> I expected to see git graph log with the project commits.
>>
>> What happened instead? (Actual behavior)
>> On top of the project commits were added these four pseudo-commits made
>> by some Git component(s).
>>
>> * f7b611ce - Wed, 12 Aug 2026 09:26:03 +0200 (5 hours ago)
>> |  Notes added by 'git notes append' - rewrite-analytics
>> * 1a7605bb - Wed, 12 Aug 2026 09:26:03 +0200 (5 hours ago)
>> |  Notes added by 'git notes append' - rewrite-analytics
>> * c2a05d79 - Wed, 12 Aug 2026 09:25:03 +0200 (5 hours ago)
>> |  Notes added by 'git notes append' - rewrite-analytics
>>    \
>>     * 01c630e0 - Wed, 12 Aug 2026 09:13:00 +0200 (5 hours ago)
>>        chatter: initialize notes ref - chatter
>>
>> They are not graphically connected with the actual commits, they just
>> sit there over them. No other graphical
>> tool (Sublime Merge, IntelliJ Idea) displays them.
> They are Git notes. They form their own connected graph. That’s why they
> are not connected with the “actual commits” like from some branch.
>
> The `--all` will include all refs, including Git notes like
> `refs/notes/commits`.
>
> This doesn’t look like a bug.
>
>> [snip]
D. Ben KnobleAug 12, 2026, 13:14 UTC in reply to Marcel Svitalský on lore

Re: Bugreport

[please don't top-post]
Show 48 quoted lines
> On 12/08/2026 14:54, Kristoffer Haugsbakk wrote:
> > I have only skimmed this.
> >
> > On Wed, Aug 12, 2026, at 14:31, Marcel Svitalský wrote:
> >> What did you do before the bug happened? (Steps to reproduce your issue)
> >> I called `git lg` command to display git graph log in my terminal. The
> >> command is defined in my
> >> general gitconfig file as follows:
> >>
> >> # double liner with hash, time, branches and tags on first line and the
> >> message on second
> >> lg = "!f() { num=15; if [ \"$1\" != \"\" ] && ( echo \"$1\" | grep -q
> >> \"^[0-9]\\\\+\\$\" ) ; then num=\"$1\" ; shift ; fi ; [ $num -eq 0 ] &&
> >> num=999999999 ; git \"$@\" log -n \"$num\" --graph --abbrev-commit
> >> --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold
> >> cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold
> >> yellow)%d%C(reset)%n'' %C(white)%s%C(reset)' --all; }; f"
> > Note the `--all`.
> >
> >> What did you expect to happen? (Expected behavior)
> >> I expected to see git graph log with the project commits.
> >>
> >> What happened instead? (Actual behavior)
> >> On top of the project commits were added these four pseudo-commits made
> >> by some Git component(s).
> >>
> >> * f7b611ce - Wed, 12 Aug 2026 09:26:03 +0200 (5 hours ago)
> >> |  Notes added by 'git notes append' - rewrite-analytics
> >> * 1a7605bb - Wed, 12 Aug 2026 09:26:03 +0200 (5 hours ago)
> >> |  Notes added by 'git notes append' - rewrite-analytics
> >> * c2a05d79 - Wed, 12 Aug 2026 09:25:03 +0200 (5 hours ago)
> >> |  Notes added by 'git notes append' - rewrite-analytics
> >>    \
> >>     * 01c630e0 - Wed, 12 Aug 2026 09:13:00 +0200 (5 hours ago)
> >>        chatter: initialize notes ref - chatter
> >>
> >> They are not graphically connected with the actual commits, they just
> >> sit there over them. No other graphical
> >> tool (Sublime Merge, IntelliJ Idea) displays them.
> > They are Git notes. They form their own connected graph. That’s why they
> > are not connected with the “actual commits” like from some branch.
> >
> > The `--all` will include all refs, including Git notes like
> > `refs/notes/commits`.
> >
> > This doesn’t look like a bug.
> >
> >> [snip]

On Wed, Aug 12, 2026 at 9:03 AM Marcel Svitalský <marcel.svitalsky@gmail.com> wrote:

>
> I see, thank you. Is this a new feature? I've been using this command
> for years
> and today is the first time I am seeing this.
Notes are not new. Perhaps a tool you use started creating them?
> Also, is there another
> flag instead of
> `--all` that would just include the actual commits only?

You could limit the refs to be listed, like maybe "--branches --tags --remotes", or "--exclude='refs/notes/*' --all" ? (I'm omitting treatment of refs/stash, too, for now.)

-- 
D. Ben Knoble
Marcel SvitalskýAug 12, 2026, 13:36 UTC in reply to D. Ben Knoble on lore

Re: Bugreport

On 12/08/2026 15:14, D. Ben Knoble wrote:
Show 57 quoted lines
> [please don't top-post]
>
>
>> On 12/08/2026 14:54, Kristoffer Haugsbakk wrote:
>>> I have only skimmed this.
>>>
>>> On Wed, Aug 12, 2026, at 14:31, Marcel Svitalský wrote:
>>>> What did you do before the bug happened? (Steps to reproduce your issue)
>>>> I called `git lg` command to display git graph log in my terminal. The
>>>> command is defined in my
>>>> general gitconfig file as follows:
>>>>
>>>> # double liner with hash, time, branches and tags on first line and the
>>>> message on second
>>>> lg = "!f() { num=15; if [ \"$1\" != \"\" ] && ( echo \"$1\" | grep -q
>>>> \"^[0-9]\\\\+\\$\" ) ; then num=\"$1\" ; shift ; fi ; [ $num -eq 0 ] &&
>>>> num=999999999 ; git \"$@\" log -n \"$num\" --graph --abbrev-commit
>>>> --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold
>>>> cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold
>>>> yellow)%d%C(reset)%n'' %C(white)%s%C(reset)' --all; }; f"
>>> Note the `--all`.
>>>
>>>> What did you expect to happen? (Expected behavior)
>>>> I expected to see git graph log with the project commits.
>>>>
>>>> What happened instead? (Actual behavior)
>>>> On top of the project commits were added these four pseudo-commits made
>>>> by some Git component(s).
>>>>
>>>> * f7b611ce - Wed, 12 Aug 2026 09:26:03 +0200 (5 hours ago)
>>>> |  Notes added by 'git notes append' - rewrite-analytics
>>>> * 1a7605bb - Wed, 12 Aug 2026 09:26:03 +0200 (5 hours ago)
>>>> |  Notes added by 'git notes append' - rewrite-analytics
>>>> * c2a05d79 - Wed, 12 Aug 2026 09:25:03 +0200 (5 hours ago)
>>>> |  Notes added by 'git notes append' - rewrite-analytics
>>>>     \
>>>>      * 01c630e0 - Wed, 12 Aug 2026 09:13:00 +0200 (5 hours ago)
>>>>         chatter: initialize notes ref - chatter
>>>>
>>>> They are not graphically connected with the actual commits, they just
>>>> sit there over them. No other graphical
>>>> tool (Sublime Merge, IntelliJ Idea) displays them.
>>> They are Git notes. They form their own connected graph. That’s why they
>>> are not connected with the “actual commits” like from some branch.
>>>
>>> The `--all` will include all refs, including Git notes like
>>> `refs/notes/commits`.
>>>
>>> This doesn’t look like a bug.
>>>
>>>> [snip]
> On Wed, Aug 12, 2026 at 9:03 AM Marcel Svitalský
> <marcel.svitalsky@gmail.com> wrote:
>> I see, thank you. Is this a new feature? I've been using this command
>> for years
>> and today is the first time I am seeing this.
> Notes are not new. Perhaps a tool you use started creating them?
I suspect lazygit. Or Idea, I don't know and won't investigate any further.
Show 6 quoted lines
>> Also, is there another
>> flag instead of
>> `--all` that would just include the actual commits only?
> You could limit the refs to be listed, like maybe "--branches --tags
> --remotes", or "--exclude='refs/notes/*' --all" ? (I'm omitting
> treatment of refs/stash, too, for now.)

Works fine, thank you very much (and yes, I now realize I could and should have looked at the man page to begin with).

I suppose this can be closed now (I do not know the procedures here). Thanks again!

MS
Junio C HamanoAug 12, 2026, 17:03 UTC in reply to Kristoffer Haugsbakk on lore

Re: Bugreport

"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
Show 11 quoted lines
>> They are not graphically connected with the actual commits, they just
>> sit there over them. No other graphical
>> tool (Sublime Merge, IntelliJ Idea) displays them.
>
> They are Git notes. They form their own connected graph. That’s why they
> are not connected with the “actual commits” like from some branch.
>
> The `--all` will include all refs, including Git notes like
> `refs/notes/commits`.
>
> This doesn’t look like a bug.

Wow, I 100% agree with your conclusions, but it was unexpected even to me that "git log --all" crawled anything outside branches, remote-tracking branches, and tags. I can sort-of understand why the "rev-list" command at the plumbing layer may want to include everything under refs/ hierarchy, but it is unexpected for the end-user facing "git log".

Not that we want to or we can change it this late in the game, though. I wonder if "git log --all -p" also goes through the stash refs as well as notes.

Junio C HamanoAug 12, 2026, 17:04 UTC in reply to Marcel Svitalský on lore

Re: Bugreport

Marcel Svitalský <marcel.svitalsky@gmail.com> writes:
Show 5 quoted lines
> I see, thank you. Is this a new feature? I've been using this command 
> for years
> and today is the first time I am seeing this. Also, is there another 
> flag instead of
> `--all` that would just include the actual commits only?

--branches --tags --remotes

Marcel SvitalskýAug 12, 2026, 17:26 UTC in reply to Junio C Hamano on lore

Re: Bugreport

On 12/08/2026 19:04, Junio C Hamano wrote:
Show 11 quoted lines
> Marcel Svitalský <marcel.svitalsky@gmail.com> writes:
>
>> I see, thank you. Is this a new feature? I've been using this command
>> for years
>> and today is the first time I am seeing this. Also, is there another
>> flag instead of
>> `--all` that would just include the actual commits only?
> --branches
> --tags
> --remotes
>

Thank you, I actually want stashes included in the log so I chose the `--exclude='refs/notes/*' --all` solution suggested by D. Ben Knoble.

MS
Kristoffer HaugsbakkAug 13, 2026, 04:59 UTC in reply to Junio C Hamano on lore

Re: Bugreport

On Wed, Aug 12, 2026, at 19:03, Junio C Hamano wrote:
Show 17 quoted lines
> "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
>>[snip]
>>
>> They are Git notes. They form their own connected graph. That’s why they
>> are not connected with the “actual commits” like from some branch.
>>
>> The `--all` will include all refs, including Git notes like
>> `refs/notes/commits`.
>>
>> This doesn’t look like a bug.
>
> Wow, I 100% agree with your conclusions, but it was unexpected even
> to me that "git log --all" crawled anything outside branches,
> remote-tracking branches, and tags.  I can sort-of understand why
> the "rev-list" command at the plumbing layer may want to include
> everything under refs/ hierarchy, but it is unexpected for the
> end-user facing "git log".

Maybe `--all` was added before Git notes and that was the intent? Well, they would known that it would include whatever custom refs that people wanted. But then maybe they thought of it as:

• branches, remote-tracking branches, tags (from git(1))
• (git-stash(1) is an old command; I think it might have been an
  oversight to include it with `--all`? (see end of this message))
• whatever custom refs the repo uses; these you should know (?) and
  shouldn’t get surprised by

The custom refs would have been added by third-party programs, but someone would have thought that it was worth going through the effort of pushing out these refs to other people. Although, people could still be surprised by mere bookkeeping data showing up with `--all`.[1]

***

Note for others: One doesn’t end up with Git notes added by git(1)[1] *by others* that easily. ;) Branches and tags can be pushed out easily, but you need an explicit refspec to push Git notes. And I don’t think git-notes(1) mentions this. I would venture to bet that most people who have learned to push out Git notes have learned it from StackOverflow or some other not-Git project site.

And after someone has gone through the trouble of pushing them, other people also need to fetch them with an explicit refspec.

† 1: By other programs is a different matter. Git notes are a great way
     to attach metadata to commits, so many third-party tools use
     that. And it might not matter to the end-user whether data about
     which commit messages have typos in them is stored in Git notes or
     in some Sqlite database, but `--all` will reveal that
     implementation detail if Notes are used.
>
> Not that we want to or we can change it this late in the game,
> though.  I wonder if "git log --all -p" also goes through the stash
> refs as well as notes.
It does show the commits from `refs/stash`.

Back to recent threads