From 9ae2172aed289f2706a0e88288909fa47eddd7e7 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 20 Nov 2005 10:40:31 -0800 Subject: [PATCH] merge-one-file: use rmdir -p The flag is universally available, even on VMS; use it. Signed-off-by: Junio C Hamano --- git-merge-one-file.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index b285990fb..c3eca8b33 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" ;; -- 2.26.2