diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-03-09 18:38:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-09 18:38:18 -0700 |
commit | c4994ce953b4f0fdbf80004da24ef845907d7dd8 (patch) | |
tree | e1b235cf6f6d6016ac4ba8bd577ee9f3bd93484d | |
parent | parseopt: prevent KEEP_UNKNOWN and STOP_AT_NON_OPTION from being used together (diff) | |
parent | git-svn: support intermediate paths when matching tags/branches (diff) | |
download | tgif-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-x | git-svn.perl | 5 |
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; } |