X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=git-svn.perl;h=a54979dc51f0fc392b357da9071b6ea19aac4798;hb=ba26f296f9ddc694fc42683132bc328dffd777ec;hp=47b0c37d17101e17e34fab8ed04c3409fe106e87;hpb=68100531547f9abd00362e31282155efdc040a4c;p=git.git diff --git a/git-svn.perl b/git-svn.perl index 47b0c37d1..a54979dc5 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1023,6 +1023,7 @@ sub get_commit_entry { my $in_msg = 0; my $author; my $saw_from = 0; + my $msgbuf = ""; while (<$msg_fh>) { if (!$in_msg) { $in_msg = 1 if (/^\s*$/); @@ -1035,14 +1036,15 @@ sub get_commit_entry { if (/^From:/ || /^Signed-off-by:/) { $saw_from = 1; } - print $log_fh $_ or croak $!; + $msgbuf .= $_; } } + $msgbuf =~ s/\s+$//s; if ($Git::SVN::_add_author_from && defined($author) && !$saw_from) { - print $log_fh "\nFrom: $author\n" - or croak $!; + $msgbuf .= "\n\nFrom: $author"; } + print $log_fh $msgbuf or croak $!; command_close_pipe($msg_fh, $ctx); } close $log_fh or croak $!;