From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v3 0/2] Make find_commit_subject() consistent with --format=%s
Date: Wed, 22 Jun 2016 22:20:54 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1606222220240.10382@virtualbox> (raw)
In-Reply-To: <xmqq1t3pnnpq.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Wed, 22 Jun 2016, Junio C Hamano wrote:
> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
>
> > In an intermediate iteration of my rebase--helper patches, I
> > accidentally generated commits with more than one empty line
> > between the header and the commit message. When using
> > find_commit_subject() to show the oneline, it turned up empty, even
> > if the output of `git show --format=%s` looked fine.
>
> Much easier to read with s/this developer/I/g ;-)
:-P
> > Turned out that the pretty-printing machinery helpfully skipped any
> > blank lines before the commit message.
> >
> > In the first iteration of this patch, I failed to notice that
> > the skip_empty_lines() function used by the pretty printing (which is
> > declared static, and therefore I originally did not use it in order to
> > keep the patch as minimal as possible) skips also blank lines.
>
> By the way, I think skip_empty_lines() is misnamed, and I think your
> use of "blank lines" in the previous paragraph indicates that you
> agree ;-) It probably was OK back when it was a file-local static
> helper in pretty.c, but it becomes a part of the global API with
> 1/2, renaming it to skip_blank_lines() may be a good thing to do
> there at the same time.
>
> I could do the tweaking while queuing if you too think it should
> happen; that way we'd save one roundtrip ;-).
I just sent another iteration.
Ciao,
Dscho
next prev parent reply other threads:[~2016-06-22 20:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-18 13:12 [PATCH] Make find_commit_subject() more robust Johannes Schindelin
2016-06-20 19:35 ` Junio C Hamano
2016-06-21 12:03 ` Johannes Schindelin
2016-06-21 21:15 ` Junio C Hamano
2016-06-22 9:03 ` Johannes Schindelin
2016-06-21 12:43 ` [PATCH v2] " Johannes Schindelin
2016-06-21 20:34 ` Junio C Hamano
2016-06-22 9:34 ` [PATCH v3 0/2] Make find_commit_subject() consistent with --format=%s Johannes Schindelin
2016-06-22 9:34 ` [PATCH v3 1/2] Make the skip_empty_lines() function public Johannes Schindelin
2016-06-22 9:34 ` [PATCH v3 2/2] Make find_commit_subject() more robust Johannes Schindelin
2016-06-22 17:21 ` [PATCH v3 0/2] Make find_commit_subject() consistent with --format=%s Junio C Hamano
2016-06-22 20:20 ` Johannes Schindelin [this message]
2016-06-22 20:20 ` [PATCH v4 " Johannes Schindelin
2016-06-22 20:20 ` [PATCH v4 1/2] Make the skip_blank_lines() function public Johannes Schindelin
2016-06-22 20:20 ` [PATCH v4 2/2] Make find_commit_subject() more robust Johannes Schindelin
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=alpine.DEB.2.20.1606222220240.10382@virtualbox \
--to=johannes.schindelin@gmx.de \
--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).