Skip to content

Commit

Permalink
Merge git://git.bogomips.org/git-svn
Browse files Browse the repository at this point in the history
* git://git.bogomips.org/git-svn:
  git-svn: support intermediate paths when matching tags/branches
  • Loading branch information
Junio C Hamano committed Mar 10, 2009
2 parents 0d260f9 + 9162b86 commit c4994ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c4994ce

Please sign in to comment.