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-format-patch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git-format-patch.sh') diff --git a/git-format-patch.sh b/git-format-patch.sh index 2ebf7e859..c7133bc12 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^" -- cgit v1.2.1