Skip to content

Commit 60786bd

Browse files
boklmEric Wong
authored andcommitted
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 <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Eric Wong <[email protected]>
1 parent 128a96c commit 60786bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-svn.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1759,7 +1759,7 @@ sub get_commit_entry {
17591759
my $msgbuf = "";
17601760
while (<$msg_fh>) {
17611761
if (!$in_msg) {
1762-
$in_msg = 1 if (/^\s*$/);
1762+
$in_msg = 1 if (/^$/);
17631763
$author = $1 if (/^author (.*>)/);
17641764
} elsif (/^git-svn-id: /) {
17651765
# skip this for now, we regenerate the

0 commit comments

Comments
 (0)