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

Re: [PATCH/RFC 2/2] format-patch: show notes as message after the ---

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Apr 27, 2011, 06:37 UTC
Message-ID
<4DB7B9BF.6000009@drmicha.warpmail.net>
In-Reply-To
<7vsjt4ewsy.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 26.04.2011 19:39:
Show 33 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> When requesting notes with "--notes", "format-patch" produces notes
>> within the commit message which "am" misunderstands as being part of the
>> message.
>>
>> Change this so that notes are displayed after an additional "---". Any
>> "am" (old or new) will ignore that, so that it is a safe place for
>> additional comments:
>>
>> Log message
>> "---"
>> notes
>> "---"
>> diffstat
>> patch
>>
>> (The first "---" appears only when there is a note, of course.)
>>
>> Later on (say with "--format-notes") the output format can be changed
>> easily to accomodate a future "am" which knows how to create notes from
>> such patches.
>>
>> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
>> ---
>> Reducing the output format to one "---" only is not only complicated (the notes
>> separator is generated in a quite different place from the patch separator)
>> but also unnecessary (am reads the patch anyways) and not even preferable (to
>> give a clear separation of the parts).
>> ---
> 
> If you show more than one note, separating them with "---" in between
> would be a good idea so that reader can tell where each note ends, but I'd
It does that already. More precisely, each note is preceded by a "---\n".
> rather not to see the "---" after the last note.  Put just a blank line
> here instead.

Well, in the note which you snipped, I tried to explain that that is complicated (the note code would need to set a flag "dash_output" which the log-tree code would need to look at) and may not even be preferable, because the "---" gives a clear separation between the note and the diffstat. I'll check whether there's an easy way (and provide a test).

Michael
Previous: Junio C Hamano
Message 6 of 6 in “notes/pretty: allow callers to set the notes format from struct rev_info”
  1. 1/2 notes/pretty: allow callers to set the notes format from struct rev_infoMichael J Gruber, Apr 26, 2011
  2. 2/2 format-patch: show notes as message after the ---Michael J Gruber, Apr 26, 2011
  3. Johan HerlandApr 26, 2011
  4. Michael J GruberApr 26, 2011
  5. Junio C HamanoApr 26, 2011
  6. Michael J GruberApr 27, 2011

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.