summaryrefslogtreecommitdiff
path: root/git-format-patch.sh
diff options
context:
space:
mode:
authorMark Wooding <mdw@distorted.org.uk>2006-04-13 22:01:24 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-04-13 23:45:48 (GMT)
commitf327dbced25a3c6fcc0b84d2d6adffa9343b09f0 (patch)
tree9725761748a6282d0be75879546ddf72d98b2501 /git-format-patch.sh
parent2283645b85dc91ca958b05066511083255a8612a (diff)
downloadgit-f327dbced25a3c6fcc0b84d2d6adffa9343b09f0.zip
git-f327dbced25a3c6fcc0b84d2d6adffa9343b09f0.tar.gz
git-f327dbced25a3c6fcc0b84d2d6adffa9343b09f0.tar.bz2
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-format-patch.sh')
-rwxr-xr-xgit-format-patch.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-format-patch.sh b/git-format-patch.sh
index 2ebf7e8..c7133bc 100755
--- a/git-format-patch.sh
+++ b/git-format-patch.sh
@@ -126,8 +126,8 @@ for revpair
do
case "$revpair" in
?*..?*)
- rev1=`expr "$revpair" : '\(.*\)\.\.'`
- rev2=`expr "$revpair" : '.*\.\.\(.*\)'`
+ rev1=`expr "z$revpair" : 'z\(.*\)\.\.'`
+ rev2=`expr "z$revpair" : 'z.*\.\.\(.*\)'`
;;
*)
rev1="$revpair^"