author | Peter Collingbourne <peter@pcc.me.uk> | |
Mon, 11 Jan 2010 02:59:54 +0000 (02:59 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 12 Jan 2010 03:50:51 +0000 (19:50 -0800) | ||
commit | c5e558a80ad27774b9984258a31fbf46a1d7c152 | |
tree | 52f49eeac0af719a6cfd5312f3a6903808663461 | tree | snapshot |
parent | 902f235378cb2b2f6dd5dd664b9630c95321f0ae | commit | diff |
Remove empty directories when checking out a commit with fewer submodules
Change the unlink_entry function to use rmdir to remove submodule
directories. Currently we try to use unlink, which will never succeed.
Of course rmdir will only succeed for empty (i.e. not checked out)
submodule directories. Behaviour if a submodule is checked out stays
essentially the same: print a warning message and keep the submodule
directory.
Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Change the unlink_entry function to use rmdir to remove submodule
directories. Currently we try to use unlink, which will never succeed.
Of course rmdir will only succeed for empty (i.e. not checked out)
submodule directories. Behaviour if a submodule is checked out stays
essentially the same: print a warning message and keep the submodule
directory.
Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7400-submodule-basic.sh | diff | blob | history | |
unpack-trees.c | diff | blob | history |