git svn: log removals of empty directories
This also adds a test case for: "git svn: Don't create empty directories whose parents were deleted" which was the reason we found this bug in the first place. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong committed
Dec 7, 2009 at 20:49 UTC
f9ad77a739c0d012ee58b64eda2d7ec0d4e1df9d
2 files changed
+11
-1
git-svn.perl
+1
-1
@@ -3891,11 +3891,11 @@ sub delete_entry {
3891
}
3892
print "\tD\t$gpath/\n" unless $::_q;
3893
command_close_pipe($ls, $ctx);
3894
- $self->{empty}->{$path} = 0
3894
} else {
3895
$self->{gii}->remove($gpath);
3896
print "\tD\t$gpath\n" unless $::_q;
3897
}
3898
+ $self->{empty}->{$path} = 0;
3899
undef;
3900
}
3901
t/t9146-git-svn-empty-dirs.sh
+10
@@ -105,4 +105,14 @@ test_expect_success 'empty directories in trunk exist' '
105
)
106
'
107
108
+test_expect_success 'remove a top-level directory from svn' '
109
+ svn_cmd rm -m "remove d" "$svnrepo"/d
110
+'
111
+
112
+test_expect_success 'removed top-level directory does not exist' '
113
+ git svn clone "$svnrepo" removed &&
114
+ test ! -e removed/d
115
+
116
+'
117
+
118
test_done