git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-svn: fix signed commit parsing
@ 2013-09-30 14:46 Nicolas Vigier
  2013-09-30 19:04 ` Jonathan Nieder
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Vigier @ 2013-09-30 14:46 UTC (permalink / raw)
  To: git; +Cc: normalperson, Nicolas Vigier

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>
---
 git-svn.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-svn.perl b/git-svn.perl
index ff1ce3d..1823db1 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1759,7 +1759,7 @@ sub get_commit_entry {
 		my $msgbuf = "";
 		while (<$msg_fh>) {
 			if (!$in_msg) {
-				$in_msg = 1 if (/^\s*$/);
+				$in_msg = 1 if (/^$/);
 				$author = $1 if (/^author (.*>)/);
 			} elsif (/^git-svn-id: /) {
 				# skip this for now, we regenerate the
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-10  6:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-30 14:46 [PATCH] git-svn: fix signed commit parsing Nicolas Vigier
2013-09-30 19:04 ` Jonathan Nieder
2013-10-10  6:57   ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).