Skip to content

Commit

Permalink
merge-one-file: use rmdir -p
Browse files Browse the repository at this point in the history
The flag is universally available, even on VMS; use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Nov 20, 2005
1 parent 13cfdfd commit 9ae2172
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions git-merge-one-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
;;
Expand Down

0 comments on commit 9ae2172

Please sign in to comment.