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 10, 2022, 08:37 UTC
Message-ID
<f5be5b264f30f689546db3883b4b64c88ba00cb3.camel@gmail.com>
In-Reply-To
<xmqqee3bm2b8.fsf@gitster.g>
On Wed, 2022-03-09 at 10:02 -0800, Junio C Hamano wrote:
Show 13 quoted lines
> Nuno Sá <noname.nuno@gmail.com> writes:
> 
> > 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.
> 
> 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... Either you use these default strings or don't. But I think these strings are probably used/important for git log? So we can know what is commit message and what are notes...

Show 19 quoted lines
> to format the author name?  Perhaps they want a different way to
> separate the title (to be on the "Subject:" line) out of the commit
> message?  Perhaps they want to see the log message be indented?
> Perhaps they want to see the message from the notes be line-wrapped?
> Perhaps they want to see the message from the notes not to be
> indented?  Perhaps they want to see the "Notes (amlog):" label to
> format the name of the notes tree differently?
> 
> Where would that end?  We have to draw the line somewhere.
> 
> The customizability via --format=<template> is given for these
> people who want to futz with that line.  One thing that may be a
> good little project to help them is to make sure that the vanilla
> "--pretty=email" can be reimplemented as "--format=<template>" (I
> doubt it is), design a way to fill the gaps (if there are) to get
> there.  Once that is done, write down the "--format=<template>" that
> is equivalent to "--pretty=email" somewhere in the doc, to give
> those who want to derive from the canned format some reasonable
> starting point.

Well, this would be surely nice. For now, I will just remove it by hand or script something to do it before calling git-send-email.

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