summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-06-13 09:37:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-06-13 18:23:51 (GMT)
commit38570a47fcd9d7631c03673249f587697fa85677 (patch)
tree7116f25263603cf4d340806b6830ae0e304f426a /git-svn.perl
parentb3bf96d483ac2ff4a7523445a4e3f53f266501a4 (diff)
downloadgit-38570a47fcd9d7631c03673249f587697fa85677.zip
git-38570a47fcd9d7631c03673249f587697fa85677.tar.gz
git-38570a47fcd9d7631c03673249f587697fa85677.tar.bz2
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>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 58f7dd0..0ae8d70 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1457,7 +1457,7 @@ sub tmp_config {
my (@args) = @_;
my $old_def_config = "$ENV{GIT_DIR}/svn/config";
my $config = "$ENV{GIT_DIR}/svn/.metadata";
- if (-e $old_def_config && ! -e $config) {
+ if (! -f $config && -f $old_def_config) {
rename $old_def_config, $config or
die "Failed rename $old_def_config => $config: $!\n";
}