summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-merge-one-file.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh
index b285990fb2..c3eca8b332 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"
;;