summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-svn.perl2
-rwxr-xr-xt/t9146-git-svn-empty-dirs.sh10
2 files changed, 11 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index bdd1f966c3..5a52068b12 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3891,11 +3891,11 @@ sub delete_entry {
}
print "\tD\t$gpath/\n" unless $::_q;
command_close_pipe($ls, $ctx);
- $self->{empty}->{$path} = 0
} else {
$self->{gii}->remove($gpath);
print "\tD\t$gpath\n" unless $::_q;
}
+ $self->{empty}->{$path} = 0;
undef;
}
diff --git a/t/t9146-git-svn-empty-dirs.sh b/t/t9146-git-svn-empty-dirs.sh
index 70c52c1f97..9b8d0463fa 100755
--- a/t/t9146-git-svn-empty-dirs.sh
+++ b/t/t9146-git-svn-empty-dirs.sh
@@ -105,4 +105,14 @@ test_expect_success 'empty directories in trunk exist' '
)
'
+test_expect_success 'remove a top-level directory from svn' '
+ svn_cmd rm -m "remove d" "$svnrepo"/d
+'
+
+test_expect_success 'removed top-level directory does not exist' '
+ git svn clone "$svnrepo" removed &&
+ test ! -e removed/d
+
+'
+
test_done