Skip to content

Commit 9a2bb05

Browse files
artagnonEric Wong
authored andcommitted
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 <[email protected]> Signed-off-by: Eric Wong <[email protected]>
1 parent 563d4e5 commit 9a2bb05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

perl/Git/SVN.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2365,7 +2365,7 @@ sub _new {
23652365

23662366
# Older repos imported by us used $GIT_DIR/svn/foo instead of
23672367
# $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/(.+)}) {
23692369
my $old_dir = "$ENV{GIT_DIR}/svn/$1";
23702370
if (-d $old_dir && ! -d $dir) {
23712371
$dir = $old_dir;

0 commit comments

Comments
 (0)