summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorMichael J. Kiwala <mkiwala@genome.wustl.edu>2010-06-01 21:24:57 (GMT)
committerEric Wong <normalperson@yhbt.net>2010-06-03 20:51:41 (GMT)
commit7c42e390a37a11b1f7a77f5f07c261a8f930663a (patch)
tree1f9dd8c7da8418e5f30fea0f9ffdb543d4594567 /git-svn.perl
parentbdc4204119d2847ea8f1ae5e44614be859951822 (diff)
downloadgit-7c42e390a37a11b1f7a77f5f07c261a8f930663a.zip
git-7c42e390a37a11b1f7a77f5f07c261a8f930663a.tar.gz
git-7c42e390a37a11b1f7a77f5f07c261a8f930663a.tar.bz2
git svn: fix empty directory creation
Avoid attempts to stat() the contents of '', which could happen when the root directory is empty. Additionally, remove the unnecessary '_' stat optimization since it was confusing and possibly throwing off the non-existent case. [ew: fixed indentation, rewrote commit message] Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Michael J. Kiwala <mkiwala@genome.wustl.edu>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index b3b6964..09c4ca5 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2836,8 +2836,9 @@ sub mkemptydirs {
foreach my $d (sort keys %empty_dirs) {
$d = uri_decode($d);
$d =~ s/$strip//;
+ next unless length($d);
next if -d $d;
- if (-e _) {
+ if (-e $d) {
warn "$d exists but is not a directory\n";
} else {
print "creating empty directory: $d\n";