Shell utilities: Guard against expr' magic tokens.

Some words, e.g., `match', are special to expr(1), and cause strange
parsing effects.  Track down all uses of expr and mangle the arguments
so that this isn't a problem.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Mark Wooding
2006-04-13 22:01:24 +00:00
committed by Junio C Hamano
parent 2283645b85
commit f327dbced2
9 changed files with 30 additions and 30 deletions

View File

@ -26,7 +26,7 @@ case "${1:-.}${2:-.}${3:-.}" in
fi
if test -f "$4"; then
rm -f -- "$4" &&
rmdir -p "$(expr "$4" : '\(.*\)/')" 2>/dev/null || :
rmdir -p "$(expr "z$4" : 'z\(.*\)/')" 2>/dev/null || :
fi &&
exec git-update-index --remove -- "$4"
;;