Skip to content

Commit c4994ce

Browse files
committed
Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn: git-svn: support intermediate paths when matching tags/branches
2 parents 0d260f9 + 9162b86 commit c4994ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git-svn.perl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2351,7 +2351,10 @@ sub match_paths {
23512351
if (my $path = $paths->{"/$self->{path}"}) {
23522352
return ($path->{action} eq 'D') ? 0 : 1;
23532353
}
2354-
$self->{path_regex} ||= qr/^\/\Q$self->{path}\E\//;
2354+
my $repos_root = $self->ra->{repos_root};
2355+
my $extended_path = $self->{url} . '/' . $self->{path};
2356+
$extended_path =~ s#^\Q$repos_root\E(/|$)##;
2357+
$self->{path_regex} ||= qr/^\/\Q$extended_path\E\//;
23552358
if (grep /$self->{path_regex}/, keys %$paths) {
23562359
return 1;
23572360
}

0 commit comments

Comments
 (0)