Skip to content

Commit

Permalink
git-svn: fix rel_path() when not connected to the repository root
Browse files Browse the repository at this point in the history
This should fix fetching for people who did not use
"git svn --minimize" or cannot connect to the repository root
due to the lack of permissions.

I'm not sure what I was on when I made the change to the
rel_path() function in 4e9f6cc
that made it die() when we weren't connected to the repository
root :x

Thanks to Sven Verdoolaege for reporting this bug.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Mar 26, 2007
1 parent 3301521 commit 0b59451
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -1327,8 +1327,10 @@ sub rel_path {
my ($self) = @_;
my $repos_root = $self->ra->{repos_root};
return $self->{path} if ($self->{url} eq $repos_root);
die "BUG: rel_path failed! repos_root: $repos_root, Ra URL: ",
$self->ra->{url}, " path: $self->{path}, URL: $self->{url}\n";
my $url = $self->{url} .
(length $self->{path} ? "/$self->{path}" : $self->{path});
$url =~ s!^\Q$repos_root\E(?:/+|$)!!g;
$url;
}

sub traverse_ignore {
Expand Down

0 comments on commit 0b59451

Please sign in to comment.