diff options
author | Pierre Habouzit <madcoder@debian.org> | 2007-11-08 10:32:11 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-08 01:49:01 -0800 |
commit | e817e3e8579742312534f20c0946cd3c562cfa7c (patch) | |
tree | 7b2beac11eedeb6216ca8667ffd654d1fd1d0173 /git-sh-setup.sh | |
parent | cbea86fd149f5d4aabdff06f87bc766d414b160e (diff) | |
download | git-e817e3e8579742312534f20c0946cd3c562cfa7c.tar.gz git-e817e3e8579742312534f20c0946cd3c562cfa7c.tar.xz |
sh-setup: don't let eval output to be shell-expanded.
The previous patch missed the same construct in git-clone.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Diffstat (limited to 'git-sh-setup.sh')
-rwxr-xr-x | git-sh-setup.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh index f1c4839a9..5aa62dda1 100755 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -21,12 +21,15 @@ if test -n "$OPTIONS_SPEC"; then exec "$0" -h } - [ -n "$OPTIONS_KEEPDASHDASH" ] && parseopt_extra="--keep-dashdash" - parsed=$( + parseopt_extra= + [ -n "$OPTIONS_KEEPDASHDASH" ] && + parseopt_extra="--keep-dashdash" + + eval "$( echo "$OPTIONS_SPEC" | - git rev-parse --parseopt $parseopt_extra -- "$@" - ) && - eval "$parsed" || exit + git rev-parse --parseopt $parseopt_extra -- "$@" || + echo exit $? + )" else usage() { die "Usage: $0 $USAGE" |