git-svn: fix signed commit parsing

When parsing a commit object, git-svn wrongly think that a line containing spaces means the end of headers and the start of the commit message. In case of signed commit, the gpgsig entry contains a line with one space, so "git svn dcommit" will include part of the signature in the commit message. An example of such problem : http://svnweb.mageia.org/treasurer?view=revision&revision=86 This commit changes the regex to only match an empty line as separator between the headers and the commit message. Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>

Nicolas Vigier committed Sep 30, 2013 at 16:46 UTC 60786bd41a575126c0735c55b46e1d0ee2b358cc
1 file changed +1 -1
git-svn.perl
+1 -1
@@ -1759,7 +1759,7 @@ sub get_commit_entry {
1759 my $msgbuf = "";
1760 while (<$msg_fh>) {
1761 if (!$in_msg) {
1762 - $in_msg = 1 if (/^\s*$/);
1762 + $in_msg = 1 if (/^$/);
1763 $author = $1 if (/^author (.*>)/);
1764 } elsif (/^git-svn-id: /) {
1765 # skip this for now, we regenerate the