From f327dbced25a3c6fcc0b84d2d6adffa9343b09f0 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 13 Apr 2006 22:01:24 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- git-merge-one-file.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-merge-one-file.sh') diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index 5349a1c0fc..5619409f1c 100755 --- a/git-merge-one-file.sh +++ b/git-merge-one-file.sh @@ -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" ;; -- cgit v1.2.3