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-commit.sh | |
parent | 2283645b85dc91ca958b05066511083255a8612a (diff) | |
download | git-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-commit.sh')
-rwxr-xr-x | git-commit.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-commit.sh b/git-commit.sh index bd3dc71cd6..01c73bdd08 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -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" |