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>
This commit is contained in:

committed by
Eric Wong

parent
563d4e59bd
commit
9a2bb059e7
@ -2365,7 +2365,7 @@ sub _new {
|
|||||||
|
|
||||||
# Older repos imported by us used $GIT_DIR/svn/foo instead of
|
# Older repos imported by us used $GIT_DIR/svn/foo instead of
|
||||||
# $GIT_DIR/svn/refs/remotes/foo when tracking refs/remotes/foo
|
# $GIT_DIR/svn/refs/remotes/foo when tracking refs/remotes/foo
|
||||||
if ($ref_id =~ m{^refs/remotes/(.*)}) {
|
if ($ref_id =~ m{^refs/remotes/(.+)}) {
|
||||||
my $old_dir = "$ENV{GIT_DIR}/svn/$1";
|
my $old_dir = "$ENV{GIT_DIR}/svn/$1";
|
||||||
if (-d $old_dir && ! -d $dir) {
|
if (-d $old_dir && ! -d $dir) {
|
||||||
$dir = $old_dir;
|
$dir = $old_dir;
|
||||||
|
Reference in New Issue
Block a user