diff options
author | Junio C Hamano <junkio@cox.net> | 2005-11-20 10:40:31 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-20 10:40:31 -0800 |
commit | 9ae2172aed289f2706a0e88288909fa47eddd7e7 (patch) | |
tree | 79c7900432d6a8be27083935a028f5950e418220 | |
parent | 13cfdfd5fade73c7784ec45506b446e40e76c742 (diff) | |
download | git-9ae2172aed289f2706a0e88288909fa47eddd7e7.tar.gz git-9ae2172aed289f2706a0e88288909fa47eddd7e7.tar.xz |
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>
-rwxr-xr-x | git-merge-one-file.sh | 6 |
1 files changed, 1 insertions, 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" ;; |