Re: [PATCH v3 0/2] Make find_commit_subject() consistent with --format=%s
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 22, 2016, 20:20 UTC
- Message-ID
- <alpine.DEB.2.20.1606222220240.10382@virtualbox>
- In-Reply-To
- <xmqq1t3pnnpq.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Wed, 22 Jun 2016, Junio C Hamano wrote:
Show 9 quoted lines
> 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
Show 17 quoted lines
> > 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