Commit d72ab8c8 authored by Karl Hasselström's avatar Karl Hasselström Committed by Junio C Hamano

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: default avatarKarl Hasselström <[email protected]>
Acked-by: default avatarEric Wong <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 58124733
......@@ -745,7 +745,7 @@ sub cmd_commit_diff {
my $usage = "Usage: $0 commit-diff -r<revision> ".
"<tree-ish> <tree-ish> [<URL>]";
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment