diff options
Diffstat (limited to 'git-merge-one-file.sh')
-rwxr-xr-x | git-merge-one-file.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index b08597de29..b285990fb2 100755 --- a/git-merge-one-file.sh +++ b/git-merge-one-file.sh @@ -25,7 +25,12 @@ case "${1:-.}${2:-.}${3:-.}" in echo "Removing $4" fi if test -f "$4"; then - rm -f -- "$4" + rm -f -- "$4" && + dn="$4" && + while dn=$(expr "$dn" : '\(.*\)/') && rmdir "$dn" 2>/dev/null + do + :; + done fi && exec git-update-index --remove -- "$4" ;; |