From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/4] Retain extra blank lines between the summary and the body
Date: Wed, 06 Feb 2008 12:30:37 -0800 [thread overview]
Message-ID: <7v4pclx1xu.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: alpine.LNX.1.00.0802061141320.13593@iabervon.org
Daniel Barkalow <barkalow@iabervon.org> writes:
> This is so that it's possible to have a message that will generate an
> email with the first line blank. If the email you're generating is
> actually a template, you may have a single line filling in for a
> ~3-line paragraph, meaning that the space starts with a blank line,
> which was impossible before as output from the message-splitting code.
>
> Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
> ---
> pretty.c | 4 ----
> 1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/pretty.c b/pretty.c
> index f82380b..98efac2 100644
> --- a/pretty.c
> +++ b/pretty.c
> @@ -713,7 +713,6 @@ void pp_remainder(enum cmit_fmt fmt,
> struct strbuf *sb,
> int indent)
> {
> - int first = 1;
> for (;;) {
> const char *line = *msg_p;
> int linelen = get_one_line(line);
> @@ -723,12 +722,9 @@ void pp_remainder(enum cmit_fmt fmt,
> break;
>
> if (is_empty_line(line, &linelen)) {
> - if (first)
> - continue;
> if (fmt == CMIT_FMT_SHORT)
> break;
> }
> - first = 0;
>
> strbuf_grow(sb, linelen + indent + 20);
> if (indent) {
I have to wonder if this regresses the normal codepath to
cleanse commit messages that have extra blanks at the
beginning.
next prev parent reply other threads:[~2008-02-06 20:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-06 16:43 [PATCH 3/4] Retain extra blank lines between the summary and the body Daniel Barkalow
2008-02-06 20:30 ` Junio C Hamano [this message]
2008-02-06 22:17 ` Daniel Barkalow
2008-02-07 9:09 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2008-02-17 18:35 Daniel Barkalow
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=7v4pclx1xu.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
/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).