summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3301521)
raw | patch | inline | side by side (parent: 3301521)
author | Eric Wong <normalperson@yhbt.net> | |
Sun, 25 Mar 2007 23:35:31 +0000 (16:35 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 26 Mar 2007 01:01:28 +0000 (18:01 -0700) |
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 4e9f6cc78e5d955bd0faffe76ae9aea6590189f1
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>
"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 4e9f6cc78e5d955bd0faffe76ae9aea6590189f1
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>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index e8457893db963ad3bb6be270aba0a81481119b1c..e0a48c2a8bd59b20f56d5a0570b19e0bd5c0d438 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
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 {