git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Bugreport

From
KHKristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Date
Aug 13, 2026, 04:59 UTC
Message-ID
<25c18566-134b-49af-86e8-494634fe51f5@app.fastmail.com>
In-Reply-To
<xmqqmrurxodi.fsf@gitster.g>
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`.
Previous: Junio C Hamano
Message 9 of 9 in “Bugreport”
  1. Marcel SvitalskýAug 12, 2026
  2. Kristoffer HaugsbakkAug 12, 2026
  3. Marcel SvitalskýAug 12, 2026
  4. D. Ben KnobleAug 12, 2026
  5. Marcel SvitalskýAug 12, 2026
  6. Junio C HamanoAug 12, 2026
  7. Marcel SvitalskýAug 12, 2026
  8. Junio C HamanoAug 12, 2026
  9. Kristoffer HaugsbakkAug 13, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.