Re: [PATCH 06/14] shortlog: replace hand-parsing of author with pretty-printer

2016-01-04 Thread Eric Sunshine
On Tue, Dec 29, 2015 at 2:29 AM, Jeff King wrote: > When gathering the author and oneline subject for each > commit, we hand-parse the commit headers to find the > "author" line, and then continue past to the blank line at > the end of the header. > > We can replace this tricky

Re: [PATCH 06/14] shortlog: replace hand-parsing of author with pretty-printer

2016-01-04 Thread Jeff King
On Mon, Jan 04, 2016 at 04:43:23AM -0500, Eric Sunshine wrote: > > + format_commit_message(commit, "%an <%ae>", , ); > > + if (author.len <= 3) { > > I suppose magic number 3 is the space, '<', and '>'... Yeah. That's worthy of a comment, I think (see below). I don't think we will

[PATCH 06/14] shortlog: replace hand-parsing of author with pretty-printer

2015-12-28 Thread Jeff King
When gathering the author and oneline subject for each commit, we hand-parse the commit headers to find the "author" line, and then continue past to the blank line at the end of the header. We can replace this tricky hand-parsing by simply asking the pretty-printer for the relevant items. This