@matheusbsbs / matheus-bagliano / commits / d72ab8c892
Fork 0

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 <kha@treskal.com> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Karl Hasselström committed May 17, 2008 at 17:07 UTC d72ab8c8921f74b64be029235d4d2cdd9dcb87b9
1 file changed +1 -2
git-svn.perl
+1 -2
@@ -745,7 +745,7 @@ sub cmd_commit_diff {
745 my $usage = "Usage: $0 commit-diff -r<revision> ".
746 "<tree-ish> <tree-ish> [<URL>]";
747 fatal($usage) if (!defined $ta || !defined $tb);
748 - my $svn_path;
748 + my $svn_path = '';
749 if (!defined $url) {
750 my $gs = eval { Git::SVN->new };
751 if (!$gs) {
@@ -769,7 +769,6 @@ sub cmd_commit_diff {
769 $_message ||= get_commit_entry($tb)->{log};
770 }
771 my $ra ||= Git::SVN::Ra->new($url);
772 - $svn_path ||= $ra->{svn_path};
772 my $r = $_revision;
773 if ($r eq 'HEAD') {
774 $r = $ra->get_latest_revnum;