Skip to content

Commit f705059

Browse files
author
Eric Wong
committed
git-svn: convert globs to regexps for branch destinations
Marc Branchaud wrote: > I'm fairly happy with this, except for the way the branch > subcommand matches refspecs. The patch does a simple string > comparison, but it'd be better to do an actual glob. I just > couldn't track down the right function for that, so I left it as > a strcmp and hope that a gitizen can tell me how to glob here. Signed-off-by: Eric Wong <[email protected]>
1 parent 6224406 commit f705059

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

git-svn.perl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,9 @@ sub cmd_branch {
646646
" with the --destination argument.\n";
647647
}
648648
foreach my $g (@{$allglobs}) {
649-
if ($_branch_dest eq $g->{path}->{left}) {
649+
# SVN::Git::Editor could probably be moved to Git.pm..
650+
my $re = SVN::Git::Editor::glob2pat($g->{path}->{left});
651+
if ($_branch_dest =~ /$re/) {
650652
$glob = $g;
651653
last;
652654
}

0 commit comments

Comments
 (0)