@matheusbsbs / matheus-bagliano / commits / 38570a47fc
Fork 0

git-svn: reduce stat() calls for a backwards compatibility check

Also, this fixes a bug where in an odd case a remote named "config" could get renamed to ".metadata". Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eric Wong committed Jun 13, 2007 at 02:37 UTC 38570a47fcd9d7631c03673249f587697fa85677
1 file changed +1 -1
git-svn.perl
+1 -1
@@ -1457,7 +1457,7 @@ sub tmp_config {
1457 my (@args) = @_;
1458 my $old_def_config = "$ENV{GIT_DIR}/svn/config";
1459 my $config = "$ENV{GIT_DIR}/svn/.metadata";
1460 - if (-e $old_def_config && ! -e $config) {
1460 + if (! -f $config && -f $old_def_config) {
1461 rename $old_def_config, $config or
1462 die "Failed rename $old_def_config => $config: $!\n";
1463 }