From: Nicolas Vigier <boklm@mars-attacks.org>
To: git@vger.kernel.org
Cc: normalperson@yhbt.net, Nicolas Vigier <boklm@mars-attacks.org>
Subject: [PATCH] git-svn: fix signed commit parsing
Date: Mon, 30 Sep 2013 16:46:14 +0200 [thread overview]
Message-ID: <1380552374-26103-1-git-send-email-boklm@mars-attacks.org> (raw)
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
next reply other threads:[~2013-09-30 14:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 14:46 Nicolas Vigier [this message]
2013-09-30 19:04 ` [PATCH] git-svn: fix signed commit parsing Jonathan Nieder
2013-10-10 6:57 ` Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380552374-26103-1-git-send-email-boklm@mars-attacks.org \
--to=boklm@mars-attacks.org \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).