Skip to content

Commit 38570a4

Browse files
Eric Wonggitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b3bf96d commit 38570a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-svn.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,7 @@ sub tmp_config {
14571457
my (@args) = @_;
14581458
my $old_def_config = "$ENV{GIT_DIR}/svn/config";
14591459
my $config = "$ENV{GIT_DIR}/svn/.metadata";
1460-
if (-e $old_def_config && ! -e $config) {
1460+
if (! -f $config && -f $old_def_config) {
14611461
rename $old_def_config, $config or
14621462
die "Failed rename $old_def_config => $config: $!\n";
14631463
}

0 commit comments

Comments
 (0)