aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-09 18:38:18 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-09 18:38:18 -0700
commitc4994ce953b4f0fdbf80004da24ef845907d7dd8 (patch)
treee1b235cf6f6d6016ac4ba8bd577ee9f3bd93484d
parent0d260f9a09a2febeb86fdada7224d271a76d2e3c (diff)
parent9162b8640b4e9e199fb92eb6b8a3787f268531d5 (diff)
downloadgit-c4994ce953b4f0fdbf80004da24ef845907d7dd8.tar.gz
git-c4994ce953b4f0fdbf80004da24ef845907d7dd8.tar.xz
Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn: git-svn: support intermediate paths when matching tags/branches
-rwxr-xr-xgit-svn.perl5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 959eb52f3..8be6be00c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2351,7 +2351,10 @@ sub match_paths {
if (my $path = $paths->{"/$self->{path}"}) {
return ($path->{action} eq 'D') ? 0 : 1;
}
- $self->{path_regex} ||= qr/^\/\Q$self->{path}\E\//;
+ my $repos_root = $self->ra->{repos_root};
+ my $extended_path = $self->{url} . '/' . $self->{path};
+ $extended_path =~ s#^\Q$repos_root\E(/|$)##;
+ $self->{path_regex} ||= qr/^\/\Q$extended_path\E\//;
if (grep /$self->{path_regex}/, keys %$paths) {
return 1;
}