From: Junio C Hamano Date: Sun, 20 Nov 2005 18:40:31 +0000 (-0800) Subject: merge-one-file: use rmdir -p X-Git-Tag: v0.99.9k^2~49 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9ae2172aed289f2706a0e88288909fa47eddd7e7;p=git.git merge-one-file: use rmdir -p The flag is universally available, even on VMS; use it. Signed-off-by: Junio C Hamano --- diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index b285990f..c3eca8b3 100755 --- a/git-merge-one-file.sh +++ b/git-merge-one-file.sh @@ -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" ;;