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

Re: git notes question

From
NSNuno Sá <noname.nuno@gmail.com>
Date
Mar 9, 2022, 09:11 UTC
Message-ID
<d204419925e7a4486d9a66a8a0f807a77be6d1b7.camel@gmail.com>
In-Reply-To
<CA+JQ7M-dkV_AGJ8+4C6HcCN1sQgBtyfYbgUbnQQmYz9So3WwQQ@mail.gmail.com>
Hi Erik,
On Wed, 2022-03-09 at 09:54 +0100, Erik Cervin Edin wrote:
Show 14 quoted lines
> 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.
> 

Well, this is the one I would like (hoped) that we could do something about. When I do '--notes' in git-format-patch, I will always see:

``` (Typical git commit) ...

---
(I just wanted "Notes:" to be removed and my notes to start at the
beginning of the line).
Notes: 
	(my notes go here)
...

AFAICT, git-format-patch looks to be using --pretty=email and I think we can use --pretty in git-format-patch but having to mimic the email format "by hand" is just painful and I was hoping a better way could exist.

```
> 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

I'm aware of this and by briefly looking into the source code this seemed the only way to actually remove those predefined strings from notes (I was just hoping I was wrong).

> 
Thanks for the feedback!
- Nuno Sá
Previous: Erik Cervin EdinNext: Junio C Hamano
Message 3 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.