git svn: fix fetch where glob is on the top-level URL
In cases where the top-level URL we're tracking is the path we glob against, we can once again track odd repositories that keep branches/tags at the top level. This regression was introduced in commit 6f5748e14cc5bb0a836b649fb8e2d6a5eb166f1d. Thanks to Daniel Cordero for the original bug report and bisection. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong committed
Oct 22, 2009 at 23:39 UTC
ffd5c8e457f8139ee89006083d97d47e17a066b8
1 file changed
+2
-2
git-svn.perl
+2
-2
@@ -1765,7 +1765,7 @@ sub read_all_remotes {
1765
my $use_svm_props = eval { command_oneline(qw/config --bool
1766
svn.useSvmProps/) };
1767
$use_svm_props = $use_svm_props eq 'true' if $use_svm_props;
1768
- my $svn_refspec = qr{\s*/?(.*?)\s*:\s*(.+?)\s*};
1768
+ my $svn_refspec = qr{\s*(.*?)\s*:\s*(.+?)\s*};
1769
foreach (grep { s/^svn-remote\.// } command(qw/config -l/)) {
1770
if (m!^(.+)\.fetch=$svn_refspec$!) {
1771
my ($remote, $local_ref, $remote_ref) = ($1, $2, $3);
@@ -1979,7 +1979,7 @@ sub find_ref {
1979
my ($ref_id) = @_;
1980
foreach (command(qw/config -l/)) {
1981
next unless m!^svn-remote\.(.+)\.fetch=
1982
- \s*/?(.*?)\s*:\s*(.+?)\s*$!x;
1982
+ \s*(.*?)\s*:\s*(.+?)\s*$!x;
1983
my ($repo_id, $path, $ref) = ($1, $2, $3);
1984
if ($ref eq $ref_id) {
1985
$path = '' if ($path =~ m#^\./?#);