Git::SVN: handle missing ref_id case correctly
ref_id should not match "refs/remotes/". [ew: dropped initial hunk for GIT_SVN_ID at Ramkumar's request] Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
Ramkumar Ramachandra committed
Jan 10, 2015 at 09:35 UTC
9a2bb059e76b1368392f86ecf7af2ba188e3cac5
1 file changed
+1
-1
perl/Git/SVN.pm
+1
-1
@@ -2365,7 +2365,7 @@ sub _new {
2365
2366
# Older repos imported by us used $GIT_DIR/svn/foo instead of
2367
# $GIT_DIR/svn/refs/remotes/foo when tracking refs/remotes/foo
2368
- if ($ref_id =~ m{^refs/remotes/(.*)}) {
2368
+ if ($ref_id =~ m{^refs/remotes/(.+)}) {
2369
my $old_dir = "$ENV{GIT_DIR}/svn/$1";
2370
if (-d $old_dir && ! -d $dir) {
2371
$dir = $old_dir;