From: Michael J Gruber <git@drmicha.warpmail.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC 2/2] format-patch: show notes as message after the ---
Date: Wed, 27 Apr 2011 08:37:51 +0200 [thread overview]
Message-ID: <4DB7B9BF.6000009@drmicha.warpmail.net> (raw)
In-Reply-To: <7vsjt4ewsy.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 26.04.2011 19:39:
> 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
prev parent reply other threads:[~2011-04-27 6:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 8:54 [PATCH/RFC 1/2] notes/pretty: allow callers to set the notes format from struct rev_info Michael J Gruber
2011-04-26 8:54 ` [PATCH/RFC 2/2] format-patch: show notes as message after the --- Michael J Gruber
2011-04-26 9:28 ` Johan Herland
2011-04-26 9:44 ` Michael J Gruber
2011-04-26 17:39 ` Junio C Hamano
2011-04-27 6:37 ` Michael J Gruber [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DB7B9BF.6000009@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).