Code

merge-one-file: use rmdir -p
authorJunio C Hamano <junkio@cox.net>
Sun, 20 Nov 2005 18:40:31 +0000 (10:40 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 20 Nov 2005 18:40:31 +0000 (10:40 -0800)
The flag is universally available, even on VMS; use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
git-merge-one-file.sh

index b285990fb24f8a2a3dc96e27af67b6afbac024c7..c3eca8b3321df8dbf632fb687003737d8989d6f6 100755 (executable)
@@ -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"
        ;;