summaryrefslogtreecommitdiff
path: root/git-merge-one-file.sh
diff options
context:
space:
mode:
authorMark Wooding <mdw@distorted.org.uk>2006-04-13 22:01:24 +0000
committerJunio C Hamano <junkio@cox.net>2006-04-13 16:45:48 -0700
commitf327dbced25a3c6fcc0b84d2d6adffa9343b09f0 (patch)
tree9725761748a6282d0be75879546ddf72d98b2501 /git-merge-one-file.sh
parent2283645b85dc91ca958b05066511083255a8612a (diff)
downloadgit-f327dbced25a3c6fcc0b84d2d6adffa9343b09f0.tar.gz
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>
Diffstat (limited to 'git-merge-one-file.sh')
-rwxr-xr-xgit-merge-one-file.sh2
1 files changed, 1 insertions, 1 deletions
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"
;;