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

Re: git notes question

From
EEErik Cervin Edin <erik@cervined.in>
Date
Mar 9, 2022, 08:54 UTC
Message-ID
<CA+JQ7M-dkV_AGJ8+4C6HcCN1sQgBtyfYbgUbnQQmYz9So3WwQQ@mail.gmail.com>
In-Reply-To
<ea67407120aa710f81af048d22be09281ac28107.camel@gmail.com>
Hi Nuno!
> Is there any way to remove the default "Notes:" line on git-notes? I
> don't really mind to have it in git log but when generating patches for
> instance, I would like my notes to be something like:
Just to be clear, in relation to which command are we talking about?

For git-format-patch there's --notes which I assume doesn't support customization.

For git-log it's possible to customize how notes appear in git-log
using the standard way of formatting log messages, pretty format.
%N
is for the commit notes
https://git-scm.com/docs/pretty-formats#Documentation/pretty-formats.txt-emNem
For example
  git log --pretty=format:%h%n%N
displays each short hash and it's corresponding note.

It's also possible to use it when generating todos for git-rebase, however, they are written with a prepended new-line which breaks the todo script :/

Previous: Nuno SáNext: Nuno Sá
Message 2 of 9 in “git notes question”
  1. Nuno SáMar 8, 2022
  2. Erik Cervin EdinMar 9, 2022
  3. Nuno SáMar 9, 2022
  4. Junio C HamanoMar 9, 2022
  5. Nuno SáMar 10, 2022
  6. Erik Cervin EdinMar 10, 2022
  7. Nuno SáMar 10, 2022
  8. Junio C HamanoMar 10, 2022
  9. Nuno SáMar 11, 2022

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.