merge-one-file: use rmdir -p

The flag is universally available, even on VMS; use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2005-11-20 10:40:31 -08:00
parent 13cfdfd5fa
commit 9ae2172aed

View File

@ -26,11 +26,7 @@ case "${1:-.}${2:-.}${3:-.}" in
fi
if test -f "$4"; then
rm -f -- "$4" &&
dn="$4" &&
while dn=$(expr "$dn" : '\(.*\)/') && rmdir "$dn" 2>/dev/null
do
:;
done
rmdir -p "$(expr "$4" : '\(.*\)/')" 2>/dev/null
fi &&
exec git-update-index --remove -- "$4"
;;