]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/mv.c
mv: cleanup empty WORKING_DIRECTORY
authorShaoxuan Yuan <shaoxuan.yuan02@gmail.com>
Tue, 9 Aug 2022 12:09:08 +0000 (20:09 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Aug 2022 20:57:49 +0000 (13:57 -0700)
commitb6f51e3db978ae2a72c290a10bd205f9e1d6818e
treee80faffa456988fb7fbbe44bb437837b01544acc
parent5784db1b22feceafc72454dccd9637d19fdd422c
mv: cleanup empty WORKING_DIRECTORY

Originally, moving from-in-to-out may leave an empty <source>
directory on-disk (this kind of directory is marked as
WORKING_DIRECTORY).

Cleanup such directories if they are empty (don't have any entries
under them).

Modify two tests that take <source> as WORKING_DIRECTORY to test
this behavior.

Suggested-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/mv.c
t/t7002-mv-sparse-checkout.sh