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

Re: [PATCH RFC] log-tree: let format-patch not indent notes

From
Jeff King <peff@peff.net>
Date
Sep 25, 2014, 17:56 UTC
Message-ID
<20140925175651.GA11673@peff.net>
In-Reply-To
<1411661409-24562-1-git-send-email-u.kleine-koenig@pengutronix.de>
On Thu, Sep 25, 2014 at 06:10:09PM +0200, Uwe Kleine-König wrote:
Show 11 quoted lines
> Commit logs as shown by git-log are usually indented by four spaces so
> here it makes sense to do the same for commit notes.
> 
> However when using format-patch to create a patch for submission via
> e-mail the commit log isn't indented and also the "Notes:" header isn't
> really useful. So consequently don't indent and skip the header in this
> case. This also removes the empty line between the end-of-commit marker
> and the start of the notes.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---

I like this, though I think it is somewhat subjective, and there may be some corner cases. This topic has come up before (this is the tip of what I dug up, but I did not bother reading back further myself):

  http://article.gmane.org/gmane.comp.version-control.git/163144

You'd also need to consider what happens with non-default notes. If you do "--show-notes=foo" then your header is more like:

  Notes (foo):
     blah blah blah

and your patch loses the information on the source. You may even be pulling in from multiple sets of notes, in which case there are multiple headers with multiple sources.

I wonder if we would need an option to say "I am showing notes, but from just one ref and I prefer the simple three-dash format". Like "--cover-notes[=<ref>]" or something. I dunno.

-Peff
Previous: Uwe Kleine-König
Message 4 of 4 in “log-tree: let format-patch not indent notes”
  1. log-tree: let format-patch not indent notesUwe Kleine-König, Sep 25, 2014
  2. Junio C HamanoSep 25, 2014
  3. Uwe Kleine-KönigSep 25, 2014
  4. Jeff KingSep 25, 2014

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.