Skip to content

Commit

Permalink
Git::SVN: handle missing ref_id case correctly
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
artagnon authored and Eric Wong committed Jan 15, 2015
1 parent 563d4e5 commit 9a2bb05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion perl/Git/SVN.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,7 @@ sub _new {

# Older repos imported by us used $GIT_DIR/svn/foo instead of
# $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";
if (-d $old_dir && ! -d $dir) {
$dir = $old_dir;
Expand Down

0 comments on commit 9a2bb05

Please sign in to comment.