summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 30c56ea)
raw | patch | inline | side by side (parent: 30c56ea)
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) |
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>
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 | patch | blob | history | |
git-request-pull.sh | patch | blob | history | |
t/t5150-request-pull.sh | patch | blob | history |
index c364dda696912037cfafdb5e182b6e58f99e0a7e..a4ed4c3c62f0d5abcee36000a6c3a8f43dc02112 100755 (executable)
--- a/contrib/git-resurrect.sh
+++ b/contrib/git-resurrect.sh
is rather slow but allows you to resurrect other people's topic
branches."
+OPTIONS_KEEPDASHDASH=
OPTIONS_SPEC="\
git resurrect $USAGE
--
diff --git a/git-request-pull.sh b/git-request-pull.sh
index 630ceddf0356429f7ff71d280ee1056a2eb939c6..b0a03111cc64e1cb724a58e897a8727888bbc591 100755 (executable)
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
LONG_USAGE='Summarizes the changes between two commits to the standard output,
and includes the given URL in the generated summary.'
SUBDIRECTORY_OK='Yes'
+OPTIONS_KEEPDASHDASH=
OPTIONS_SPEC='git request-pull [options] start url [end]
--
p show patch text as well
index e012a364e1159926fe3bd296451269372c63b676..4c7f48a8077c8f7b84cd4ef25ad530a9347ce12a 100644 (file)
--- a/t/t5150-request-pull.sh
+++ b/t/t5150-request-pull.sh
'
+test_expect_success 'request-pull ignores OPTIONS_KEEPDASHDASH poison' '
+
+ (
+ cd local &&
+ OPTIONS_KEEPDASHDASH=Yes &&
+ export OPTIONS_KEEPDASHDASH &&
+ git checkout initial &&
+ git merge --ff-only master &&
+ git push origin master:for-upstream &&
+ git request-pull -- initial "$downstream_url" >../request
+ )
+
+'
+
test_done