diff options
-rwxr-xr-x | git-svn.perl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl index a4ab05155d..29f39c0831 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1535,9 +1535,14 @@ sub find_by_url { # repos_root and, path are optional $remotes->{$repo_id}->{$_}); } my $p = $path; + my $rwr = rewrite_root({repo_id => $repo_id}); unless (defined $p) { $p = $full_url; - $p =~ s#^\Q$u\E(?:/|$)## or next; + my $z = $u; + if ($rwr) { + $z = $rwr; + } + $p =~ s#^\Q$z\E(?:/|$)## or next; } foreach my $f (keys %$fetch) { next if $f ne $p; |