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

Re: git notes question

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 10, 2022, 17:52 UTC
Message-ID
<xmqqlexhg0fy.fsf@gitster.g>
In-Reply-To
<f5be5b264f30f689546db3883b4b64c88ba00cb3.camel@gmail.com>
Nuno Sá <noname.nuno@gmail.com> writes:
Show 12 quoted lines
>> Well, this time it was "Notes:" label, but the next person who
>> wants to see a deviation from the canned "email" format would want a
>> deviation different from yours.  Perhaps they want a different way
>
> I'm surely missing something but I'm not sure this is specific to the
> email format? It's just that git-notes by default will always either
> append the "Notes:" or "Notes (<refname>):" independent of the
> predefined format you use. The only way to stop it from doing that is,
> apparently, by using your own --format=<template>...
> ...
> What I was asking was just if there was a way to not use these default
> strings. I don't think this would open all kind of deviations.

Not limited to the email format. "git log" will always prefix "Author: " before the commit author name, "Date: " date with extra paddingbefore the author, indents the log message by 4 spaces, adds "Notes (refname):" before notes, and indentation is given before the contents of the notes. There are many things, other than the presence of the "Notes" label, that people may want to customize in the output from the commands in the "git log" family, including "git format-patch".

I think you were too focused on "Notes" tree to lose the view of the forest. A line is drawn not to special case "Notes" prefix, because there is no reason to do so without allowing all other things to also be tweaked, and it will "open all kind of deviations".

Previous: Nuno SáNext: Nuno Sá
Message 8 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.