{"thread":{"id":"4823","subject":"[PATCH] git-svn: fix --file/-F option in commit-diff","startedAt":"2006-07-10T03:20:48Z","lastAt":"2006-07-10T03:20:48Z","messageCount":1,"participants":["Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"23513","messageId":"11525016483767-git-send-email-normalperson@yhbt.net","threadId":"4823","inReplyTo":null,"subject":"[PATCH] git-svn: fix --file/-F option in commit-diff","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-07-10T03:20:48Z","receivedAt":"2006-07-10T03:20:48Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Also, allow messages from tags to be used as\ncommit messages.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n contrib/git-svn/git-svn.perl |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/git-svn/git-svn.perl b/contrib/git-svn/git-svn.perl\nindex 8bc4188..7cbfb6e 100755\n--- a/contrib/git-svn/git-svn.perl\n+++ b/contrib/git-svn/git-svn.perl\n@@ -760,7 +760,7 @@ sub commit_diff {\n \t\texit 1;\n \t}\n \tif (defined $_file) {\n-\t\t$_message = file_to_s($_message);\n+\t\t$_message = file_to_s($_file);\n \t} else {\n \t\t$_message ||= get_commit_message($tb,\n \t\t\t\t\t\"$GIT_DIR/.svn-commit.tmp.$$\")->{msg};\n@@ -1518,12 +1518,12 @@ sub get_commit_message {\n \topen my $msg, '>', $commit_msg or croak $!;\n \n \tchomp(my $type = `git-cat-file -t $commit`);\n-\tif ($type eq 'commit') {\n+\tif ($type eq 'commit' || $type eq 'tag') {\n \t\tmy $pid = open my $msg_fh, '-|';\n \t\tdefined $pid or croak $!;\n \n \t\tif ($pid == 0) {\n-\t\t\texec(qw(git-cat-file commit), $commit) or croak $!;\n+\t\t\texec('git-cat-file', $type, $commit) or croak $!;\n \t\t}\n \t\tmy $in_msg = 0;\n \t\twhile (<$msg_fh>) {\n-- \n1.4.1.gda58\n"}]}