summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-03-09 18:38:18 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-03-09 18:38:18 -0700
commitc4994ce953b4f0fdbf80004da24ef845907d7dd8 (patch)
treee1b235cf6f6d6016ac4ba8bd577ee9f3bd93484d
parentparseopt: prevent KEEP_UNKNOWN and STOP_AT_NON_OPTION from being used together (diff)
parentgit-svn: support intermediate paths when matching tags/branches (diff)
downloadtgif-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 959eb52f3f..8be6be00c6 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;
}