author | Jeff King <peff@peff.net> | |
Fri, 19 Feb 2010 05:57:21 +0000 (00:57 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 19 Feb 2010 06:22:22 +0000 (22:22 -0800) | ||
commit | 3fc0d131c573f6f774e2e4abba9cbda694b08321 | |
tree | f15d2c7a0f6b868656dec035b3db98d54d0be6b4 | tree | snapshot |
parent | f01f1099f40f24fe6f7802185340a6fa3a3d4f35 | commit | diff |
rm: fix bug in recursive subdirectory removal
If we remove a path in a/deep/subdirectory, we should try to
remove as many trailing components as possible (i.e.,
subdirectory, then deep, then a). However, the test for the
return value of rmdir was reversed, so we only ever deleted
at most one level.
The fix is in remove_path, so "apply" and "merge-recursive"
also are fixed.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If we remove a path in a/deep/subdirectory, we should try to
remove as many trailing components as possible (i.e.,
subdirectory, then deep, then a). However, the test for the
return value of rmdir was reversed, so we only ever deleted
at most one level.
The fix is in remove_path, so "apply" and "merge-recursive"
also are fixed.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c | diff | blob | history | |
t/t3600-rm.sh | diff | blob | history |