summaryrefslogtreecommitdiff
path: root/t/t5150-request-pull.sh
AgeCommit message (Collapse)Author
2014-06-02fix brown paper bag breakage in t5150-request-pull.shJohannes Sixt
The recent addition to the test case 'pull request format' interrupted the single-quoted text, effectively adding a third argument to the test_expect_success command. Since we do not have a prerequisite named "pull request format", the test is skipped, no matter what. Additionally, the file name argument to the grep command is missing. Fix both issues. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-16request-pull: resurrect for-linus -> tags/for-linus DWIMJunio C Hamano
Older versions of Git before v1.7.10 did not DWIM $ git pull $URL for-linus to the tag "tags/for-linus" and the users were required to say $ git pull $URL tags/for-linus instead. Because newer versions of Git works either way, request-pull used to show tags/for-linus when asked $ git request-pull origin/master $URL for-linus The recent updates broke this and in the output we see "for-linus" without the "tags/" prefix. As v1.7.10 is more than 2 years old, this should matter very little in practice, but resurrecting it is very simple. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-25request-pull: resurrect "pretty refname" featureJunio C Hamano
When asking to fetch/pull a branch whose name is B or a tag whose name is T, we used to show the command to run as: git pull $URL B git pull $URL tags/T even when B and T were spelled in a more qualified way in order to disambiguate, e.g. heads/B or refs/tags/T, but the recent update lost this feature. Resurrect it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-25request-pull: test updatesJunio C Hamano
This illustrates behaviour changes that result from the recent change by Linus. Most show good changes, but there may be some usability regressions: - The command continues to fail when the user forgot to push out before running the command, but the wording of the message has been slightly changed. - The command no longer guesses when asked to request the commit at the HEAD be pulled after pushing it to a branch 'for-upstream', even when that branch points at the correct commit. The user must ask the command with the new "master:for-upstream" syntax. The new behaviour needs to be documented in any case, but we need to agree what the new behaviour should be before doing so first. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-17tests: allow sha1's as part of the pathDennis Kaarsemaker
When running 'make test' from a path such as .../daily-build/master@bdff0e3a374617dce784f801b97500d9ba2e4705, the logic in fuzz.sed as generated by t5105-request-pull.sh was backwards, replacing object names before replacing urls, making the test fail. Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-13test: use test_i18ncmp when checking --stat outputJonathan Nieder
Ever since v1.7.9.2~13 (2012-02-01), git's diffstat-style summary line produced by "git apply --stat", "git diff --stat", and "git commit" varies by locale, producing test failures when GETTEXT_POISON is set. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-13Merge branch 'nd/diffstat-gramnum'Junio C Hamano
* nd/diffstat-gramnum: Use correct grammar in diffstat summary line
2012-02-04Use correct grammar in diffstat summary lineNguyễn Thái Ngọc Duy
"git diff --stat" and "git apply --stat" now learn to print the line "%d files changed, %d insertions(+), %d deletions(-)" in singular form whenever applicable. "0 insertions" and "0 deletions" are also omitted unless they are both zero. This matches how versions of "diffstat" that are not prehistoric produced their output, and also makes this line translatable. [jc: with help from Thomas Dickey in archaeology of "diffstat"] [jc: squashed Jonathan's updates to illustrations in tutorials and a test] Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01request-pull: explicitly ask tags/$name to be pulledJunio C Hamano
When asking for a tag to be pulled, disambiguate by leaving tags/ prefix in front of the name of the tag. E.g. ... in the git repository at: git://example.com/git/git.git/ tags/v1.2.3 for you to fetch changes up to 123456... This way, older versions of "git pull" can be used to respond to such a request more easily, as "git pull $URL v1.2.3" did not DWIM to fetch v1.2.3 tag in older versions. Also this makes it clearer for humans that the pull request is made for a tag and he should anticipate a signed one. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-19request-pull: do not emit "tag" before the tagnameJunio C Hamano
The whole point of the recent update to allow "git pull $url $tagname" is so that the integrator does not have to store the (signed) tag that is used to convey authenticity to be recorded in the resulting merge in the local repository's tag namespace. Asking for a merge be made with "git pull $url tag $tagname" defeats it. Note that the request can become ambiguous if the requestor has a branch with the same name as the tag, but that is not a new problem limited to pulling. I wouldn't mind if somebody wants to add disambiguation to the find_matching_ref logic in the script as a separate patch, though. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-16request-pull: update the "pull" command generation logicJunio C Hamano
The old code that insisted on asking for the tip of a branch to be pulled were not updated when we started allowing for a tag to be pulled. When a tag points at an older part of the history and there is no branch that points at the tagged commit, the script failed to say which ref is to be pulled. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-09request-pull: use the annotated tag contentsJunio C Hamano
The integrator tool will start allowing to pull a signed or an annotated tag, i.e. $ git pull $there tags/for-linus and the description in the tag is used to convey a meaningful message from the lieutenant to the integrator to justify the history being pulled. Include the message in the pull request e-mail, as the same information is useful in this context, too. It would encourage the lieutenants to write meaningful messages in their signed tags. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05request-pull: state what commit to expectJunio C Hamano
The message gives a detailed explanation of the commit the requester based the changes on, but lacks information that is necessary for the person who performs a fetch & merge in order to verify that the correct branch was fetched when responding to the pull request. Add a few more lines to describe the commit at the tip expected to be fetched to the same level of detail as the base commit. Also update the warning message slightly when the script notices that the commit may not have been pushed. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02t/t5150: remove space from sed scriptBrandon Casey
Solaris's xpg4/sed and IRIX's sed fail to parse these negated matching expressions when the '!' is separated from the command that follows. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-10tests: chmod +x t5150Jeff King
Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-08adapt request-pull tests for new pull request formatJonathan Nieder
10eb0007 (request-pull: avoid mentioning that the start point is a single commit, 2010-01-29), changed the pull request format, so the test needs some changes to still pass: - tolerate a missing blank line between “in the git repository at:” and the name of repository and branch - recognize subject and date in the new request format - update the expected request template to match the new format Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-08t5150: protect backslash with backslash in shellJunio C Hamano
At least /bin/sh on FreeBSD 8 interprets backslash followed by newline in an unquoted here text as "empty". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-01request-pull: protect against OPTIONS_KEEPDASHDASH from environmentJonathan Nieder
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>
2010-05-01tests for request-pullJonathan Nieder
Test that request-pull handles failure to push cleanly, writes pull requests that produce the correct effect when followed, and uses a predictable format. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>