aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-07-09 20:20:48 -0700
committerJunio C Hamano <junkio@cox.net>2006-07-10 00:19:34 -0700
commit4ad4515dfe15bec59ede5d526c2794bd30b04d86 (patch)
treee19f66ed4eb1e10688ed1dd25ed3a9a904e5c563
parent344c52aee5f2dfaad2a065f8dcc8566d52d0d6c9 (diff)
downloadgit-4ad4515dfe15bec59ede5d526c2794bd30b04d86.tar.gz
git-4ad4515dfe15bec59ede5d526c2794bd30b04d86.tar.xz
git-svn: fix --file/-F option in commit-diff
Also, allow messages from tags to be used as commit messages. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-svn.perl6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 145eaa865..f04e26993 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -760,7 +760,7 @@ sub commit_diff {
exit 1;
}
if (defined $_file) {
- $_message = file_to_s($_message);
+ $_message = file_to_s($_file);
} else {
$_message ||= get_commit_message($tb,
"$GIT_DIR/.svn-commit.tmp.$$")->{msg};
@@ -1518,12 +1518,12 @@ sub get_commit_message {
open my $msg, '>', $commit_msg or croak $!;
chomp(my $type = `git-cat-file -t $commit`);
- if ($type eq 'commit') {
+ if ($type eq 'commit' || $type eq 'tag') {
my $pid = open my $msg_fh, '-|';
defined $pid or croak $!;
if ($pid == 0) {
- exec(qw(git-cat-file commit), $commit) or croak $!;
+ exec('git-cat-file', $type, $commit) or croak $!;
}
my $in_msg = 0;
while (<$msg_fh>) {