Parse commit title correctly in presence of mergetag object
commitb1db8a6bac652bac6b0e33052a79279f532eaf1d
authorRomain Francoise <romain@orebokech.com>
Wed, 11 Apr 2012 17:28:12 +0000 (11 19:28 +0200)
committerJonas Fonseca <fonseca@diku.dk>
Wed, 11 Apr 2012 18:13:45 +0000 (11 14:13 -0400)
tree677a0ffb14d647bfc149fcbcfa5dbdd4608dbf93
parente5ca95fdc3f5fcd1af7c05874f06e83a0eeb3595
Parse commit title correctly in presence of mergetag object

When merging a signed tag, recent versions of Git store the original tag
in the merge commit as a "mergetag object". This additional content can
confuse tig's parsing of the commit title for the main view if the tag
description contains a line which happens to start with four spaces.
(Recent examples of such commits in linux.git: 94fb175c049479f0f801,
1ddca05743.)

Git helpfully separates with a blank line the commit header (which
contains the mergetag object) from the description itself, so keep track
of which lines belong to the header and only look for the title in the
description.

Signed-off-by: Romain Francoise <romain@orebokech.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig.c