diff options
-rwxr-xr-x | git-svn.perl | 7 | ||||
-rwxr-xr-x | t/t9107-git-svn-migrate.sh | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl index d7fc9aad52..571259fd09 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1286,7 +1286,12 @@ sub get_fetch_range { sub tmp_config { my (@args) = @_; - my $config = "$ENV{GIT_DIR}/svn/config"; + my $old_def_config = "$ENV{GIT_DIR}/svn/config"; + my $config = "$ENV{GIT_DIR}/svn/.metadata"; + if (-e $old_def_config && ! -e $config) { + rename $old_def_config, $config or + die "Failed rename $old_def_config => $config: $!\n"; + } my $old_config = $ENV{GIT_CONFIG}; $ENV{GIT_CONFIG} = $config; $@ = undef; diff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh index a20038b670..dc2afdaa45 100755 --- a/t/t9107-git-svn-migrate.sh +++ b/t/t9107-git-svn-migrate.sh @@ -17,6 +17,7 @@ test_expect_success 'setup old-looking metadata' " git-svn init $svnrepo && git-svn fetch && mv $GIT_DIR/svn/* $GIT_DIR/ && + mv $GIT_DIR/svn/.metadata $GIT_DIR/ && rmdir $GIT_DIR/svn && git-update-ref refs/heads/git-svn-HEAD refs/remotes/git-svn && git-update-ref refs/heads/svn-HEAD refs/remotes/git-svn && |