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>
This commit is contained in:
committed by
Junio C Hamano
parent
2283645b85
commit
f327dbced2
@ -549,8 +549,8 @@ fi >>"$GIT_DIR"/COMMIT_EDITMSG
|
||||
# Author
|
||||
if test '' != "$force_author"
|
||||
then
|
||||
GIT_AUTHOR_NAME=`expr "$force_author" : '\(.*[^ ]\) *<.*'` &&
|
||||
GIT_AUTHOR_EMAIL=`expr "$force_author" : '.*\(<.*\)'` &&
|
||||
GIT_AUTHOR_NAME=`expr "z$force_author" : 'z\(.*[^ ]\) *<.*'` &&
|
||||
GIT_AUTHOR_EMAIL=`expr "z$force_author" : '.*\(<.*\)'` &&
|
||||
test '' != "$GIT_AUTHOR_NAME" &&
|
||||
test '' != "$GIT_AUTHOR_EMAIL" ||
|
||||
die "malformatted --author parameter"
|
||||
|
||||
Reference in New Issue
Block a user