Merge git://git.bogomips.org/git-svn
authorJunio C Hamano <gitster@pobox.com>
Tue, 10 Mar 2009 01:38:18 +0000 (18:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Mar 2009 01:38:18 +0000 (18:38 -0700)
* git://git.bogomips.org/git-svn:
git-svn: support intermediate paths when matching tags/branches

git-svn.perl
index 959eb52f3fbe01c5f13eeb169549da98b0b9d64f..8be6be00c6cc76bcf2fc2d9b1fe331ec5e81fd2e 100755 (executable)
@@ -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;
        }