author | Jonathan Nieder <jrnieder@gmail.com> | |
Sat, 24 Apr 2010 12:15:37 +0000 (07:15 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 1 May 2010 18:02:21 +0000 (11:02 -0700) | ||
commit | 50ab6558bf688e15048e189bdaf9174b217e1748 | |
tree | d09eb13f6905d997371e38e5edd4e39b53757f06 | tree | snapshot |
parent | 30c56eaa2e7ab230a89a6fdc76682d2afaf5d4b1 | commit | diff |
request-pull: protect against OPTIONS_KEEPDASHDASH from environment
Like most git commands, request-pull supports a -- delimiter to allow
callers to pass arguments that would otherwise be treated as an option
afterwards. The internal OPTIONS_KEEPDASHDASH variable is passed
empty to git-sh-setup to indicate that request-pull itself does not
care about the position of the -- delimiter. But if the user has
that variable in her environment, request-pull will see the “--” and
fail.
Empty it explicitly to guard against this. While at it, make the
corresponding fix to git-resurrect, too (all other scripts in git.git
already protect themselves).
Acked-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Like most git commands, request-pull supports a -- delimiter to allow
callers to pass arguments that would otherwise be treated as an option
afterwards. The internal OPTIONS_KEEPDASHDASH variable is passed
empty to git-sh-setup to indicate that request-pull itself does not
care about the position of the -- delimiter. But if the user has
that variable in her environment, request-pull will see the “--” and
fail.
Empty it explicitly to guard against this. While at it, make the
corresponding fix to git-resurrect, too (all other scripts in git.git
already protect themselves).
Acked-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/git-resurrect.sh | diff | blob | history | |
git-request-pull.sh | diff | blob | history | |
t/t5150-request-pull.sh | diff | blob | history |