diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-06-25 02:28:15 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-06-25 02:28:25 -0700 |
commit | f7050599310c18bd67b35b8d59486116b30ff1f6 (patch) | |
tree | 079231037b9d7a81e08d98cbbffcb3731851ffda /git-svn.perl | |
parent | 6224406914c3d3fecec73e32ed271dbdc0c8736a (diff) | |
download | git-f7050599310c18bd67b35b8d59486116b30ff1f6.tar.gz git-f7050599310c18bd67b35b8d59486116b30ff1f6.tar.xz |
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 <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl index 48e8aad00..6c42e2afc 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -646,7 +646,9 @@ sub cmd_branch { " with the --destination argument.\n"; } foreach my $g (@{$allglobs}) { - if ($_branch_dest eq $g->{path}->{left}) { + # SVN::Git::Editor could probably be moved to Git.pm.. + my $re = SVN::Git::Editor::glob2pat($g->{path}->{left}); + if ($_branch_dest =~ /$re/) { $glob = $g; last; } |