diff options
author | Mark Wooding <mdw@distorted.org.uk> | 2006-04-13 22:01:24 +0000 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-04-13 16:45:48 -0700 |
commit | f327dbced25a3c6fcc0b84d2d6adffa9343b09f0 (patch) | |
tree | 9725761748a6282d0be75879546ddf72d98b2501 /git-cherry.sh | |
parent | t3600-rm: skip failed-remove test when we cannot make an unremovable file. (diff) | |
download | tgif-f327dbced25a3c6fcc0b84d2d6adffa9343b09f0.tar.xz |
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-cherry.sh')
-rwxr-xr-x | git-cherry.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-cherry.sh b/git-cherry.sh index 1a6232013b..f0e8831fa4 100755 --- a/git-cherry.sh +++ b/git-cherry.sh @@ -20,7 +20,7 @@ case "$1" in -v) verbose=t; shift ;; esac case "$#,$1" in 1,*..*) - upstream=$(expr "$1" : '\(.*\)\.\.') ours=$(expr "$1" : '.*\.\.\(.*\)$') + upstream=$(expr "z$1" : 'z\(.*\)\.\.') ours=$(expr "z$1" : '.*\.\.\(.*\)$') set x "$upstream" "$ours" shift ;; esac |