From: Karl Hasselström Date: Sat, 17 May 2008 15:07:09 +0000 (+0200) Subject: Fix path duplication in git svn commit-diff X-Git-Tag: v1.5.6-rc1~22 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d72ab8c8921f74b64be029235d4d2cdd9dcb87b9;p=git.git Fix path duplication in git svn commit-diff Given an SVN repo file:///tmp/svntest/repo, trying to commit changes to a file proj/trunk/foo.txt in that repo with this command line git svn commit-diff -r2 HEAD^ HEAD file:///tmp/svntest/repo/proj/trunk gave the error message Filesystem has no item: File not found: transaction '2-6', path '/proj/trunk/proj/trunk/foo.txt' This fixes the duplication. Signed-off-by: Karl Hasselström Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- diff --git a/git-svn.perl b/git-svn.perl index 3a6eb1cb9..ff8335879 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -745,7 +745,7 @@ sub cmd_commit_diff { my $usage = "Usage: $0 commit-diff -r ". " []"; fatal($usage) if (!defined $ta || !defined $tb); - my $svn_path; + my $svn_path = ''; if (!defined $url) { my $gs = eval { Git::SVN->new }; if (!$gs) { @@ -769,7 +769,6 @@ sub cmd_commit_diff { $_message ||= get_commit_entry($tb)->{log}; } my $ra ||= Git::SVN::Ra->new($url); - $svn_path ||= $ra->{svn_path}; my $r = $_revision; if ($r eq 'HEAD') { $r = $ra->get_latest_revnum;