Thread (4 messages) flat view 4 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 3/3] git-svn: reduce stat() calls for a backwards compatibility check

From: Eric Wong <hidden>
Date: 2016-06-15 22:43:16
Subsystem: the rest · Maintainer: Linus Torvalds

Also, this fixes a bug where in an odd case a remote named
"config" could get renamed to ".metadata".

Signed-off-by: Eric Wong <redacted>
---
 git-svn.perl |    2 +-
 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";
 	}
-- 
1.5.2.1.243.gbe00
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help