{"thread":{"id":"35046","subject":"[PATCH] git-svn: fix signed commit parsing","startedAt":"2013-09-30T14:46:14Z","lastAt":"2013-10-10T06:57:55Z","messageCount":3,"participants":["Nicolas Vigier","Jonathan Nieder","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"228467","messageId":"1380552374-26103-1-git-send-email-boklm@mars-attacks.org","threadId":"35046","inReplyTo":null,"subject":"[PATCH] git-svn: fix signed commit parsing","fromName":"Nicolas Vigier","fromEmail":"boklm@mars-attacks.org","sentAt":"2013-09-30T14:46:14Z","receivedAt":"2013-09-30T14:46:14Z","isPatch":true,"sender":{"key":"boklm@mars-attacks.org","avatar":"https://avatars.githubusercontent.com/u/405910?v=4"},"body":"When parsing a commit object, git-svn wrongly think that a line\ncontaining spaces means the end of headers and the start of the commit\nmessage. In case of signed commit, the gpgsig entry contains a line with\none space, so \"git svn dcommit\" will include part of the signature in\nthe commit message.\n\nAn example of such problem :\nhttp://svnweb.mageia.org/treasurer?view=revision&revision=86\n\nThis commit changes the regex to only match an empty line as separator\nbetween the headers and the commit message.\n\nSigned-off-by: Nicolas Vigier <boklm@mars-attacks.org>\n---\n git-svn.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex ff1ce3d..1823db1 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -1759,7 +1759,7 @@ sub get_commit_entry {\n \t\tmy $msgbuf = \"\";\n \t\twhile (<$msg_fh>) {\n \t\t\tif (!$in_msg) {\n-\t\t\t\t$in_msg = 1 if (/^\\s*$/);\n+\t\t\t\t$in_msg = 1 if (/^$/);\n \t\t\t\t$author = $1 if (/^author (.*>)/);\n \t\t\t} elsif (/^git-svn-id: /) {\n \t\t\t\t# skip this for now, we regenerate the\n-- \n1.8.4\n"},{"id":"228473","messageId":"20130930190404.GU9464@google.com","threadId":"35046","inReplyTo":"1380552374-26103-1-git-send-email-boklm@mars-attacks.org","subject":"Re: [PATCH] git-svn: fix signed commit parsing","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-09-30T19:04:04Z","receivedAt":"2013-09-30T19:04:04Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Nicolas Vigier wrote:\n\n> When parsing a commit object, git-svn wrongly think that a line\n> containing spaces means the end of headers and the start of the commit\n> message. In case of signed commit, the gpgsig entry contains a line with\n> one space, so \"git svn dcommit\" will include part of the signature in\n> the commit message.\n>\n> An example of such problem :\n> http://svnweb.mageia.org/treasurer?view=revision&revision=86\n>\n> This commit changes the regex to only match an empty line as separator\n> between the headers and the commit message.\n>\n> Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>\n\nGood catch.  For what it's worth,\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"},{"id":"228684","messageId":"20131010065755.GA2413@dcvr.yhbt.net","threadId":"35046","inReplyTo":"20130930190404.GU9464@google.com","subject":"Re: [PATCH] git-svn: fix signed commit parsing","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2013-10-10T06:57:55Z","receivedAt":"2013-10-10T06:57:55Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Nicolas Vigier wrote:\n> \n> > When parsing a commit object, git-svn wrongly think that a line\n> > containing spaces means the end of headers and the start of the commit\n> > message. In case of signed commit, the gpgsig entry contains a line with\n> > one space, so \"git svn dcommit\" will include part of the signature in\n> > the commit message.\n> >\n> > An example of such problem :\n> > http://svnweb.mageia.org/treasurer?view=revision&revision=86\n> >\n> > This commit changes the regex to only match an empty line as separator\n> > between the headers and the commit message.\n> >\n> > Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>\n> \n> Good catch.  For what it's worth,\n> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks both.  I've signed-off, added Jonathan's reviewed-by and\nqueued this up in my master.  Currently at:\n\nThe following changes since commit 128a96c98442524c7f2eeef4757b1e48445f24ce:\n\n  Update draft release notes to 1.8.5 for the fifth batch of topics (2013-09-20 12:42:02 -0700)\n\nare available in the git repository at:\n\n  git://git.bogomips.org/git-svn.git master\n\nfor you to fetch changes up to 945b9c14ffd3e11c916ee2b2428a0b2be9645829:\n\n  git-svn.txt: elaborate on rev_map files (2013-10-10 06:56:12 +0000)\n\n----------------------------------------------------------------\nKeshav Kini (4):\n      git-svn.txt: fix AsciiDoc formatting error\n      git-svn.txt: reword description of gc command\n      git-svn.txt: replace .git with $GIT_DIR\n      git-svn.txt: elaborate on rev_map files\n\nNicolas Vigier (1):\n      git-svn: fix signed commit parsing\n\n Documentation/git-svn.txt | 46 +++++++++++++++++++++++++++++++++-------------\n git-svn.perl              |  2 +-\n 2 files changed, 34 insertions(+), 14 deletions(-)\n-- \nEric Wong\n"}]}