summaryrefslogtreecommitdiff
path: root/t/t3502-cherry-pick-merge.sh
AgeCommit message (Collapse)AuthorFilesLines
2019-01-07t3502: validate '-m 1' argument is now accepted for non-merge commitsLibravatar Sergey Organov1-6/+6
Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-15cherry-pick: detect bogus arguments to --mainlineLibravatar Jeff King1-0/+9
The cherry-pick and revert commands use OPT_INTEGER() to parse --mainline. The stock parser is smart enough to reject non-numeric nonsense, but it doesn't know that parent counting starts at 1. Worse, the value "0" is indistinguishable from the unset case, so a user who assumes the counting is 0-based will get a confusing message: $ git cherry-pick -m 0 $merge error: commit ... is a merge but no -m option was given. Let's use a custom callback that enforces our range. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-15t3502, t3510: clarify cherry-pick -m failureLibravatar Ramkumar Ramachandra1-1/+1
The "cherry-pick persists opts correctly" test in t3510 (cherry-pick-sequence) can cause some confusion, because the command actually has two points of failure: 1. "-m 1" is specified on the command-line despite the base commit "initial" not being a merge-commit. 2. The revision range indicates that there will be a conflict that needs to be resolved. Although the former error is trapped, and cherry-pick die()s with the exit status 128, the reader may be distracted by the latter. Fix this by changing the revision range to something that wouldn't cause a conflict. Additionally, explicitly check the exit code in "cherry-pick a non-merge with -m should fail" in t3502 (cherry-pick-merge) to reassure the reader that this failure has nothing to do with the sequencer itself. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-13t/: Use "test_must_fail git" instead of "! git"Libravatar Stephan Beyer1-6/+6
This patch changes every occurrence of "! git" -- with the meaning that a git call has to gracefully fail -- into "test_must_fail git". This is useful to - make sure the test does not fail because of a signal, e.g. SIGSEGV, and - advertise the use of "test_must_fail" for new tests. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05t3502: Disambiguate between file and rev by adding --Libravatar Brian Gernhardt1-4/+4
On a case insensitive file system, this test fails because git-diff doesn't know if it is asking for the file "A" or the tag "a". Adding "--" at the end of the ambiguous commands allows the test to finish properly. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-02cherry-pick/revert -m: add testsLibravatar Junio C Hamano1-0/+123
This adds a new test to check cherry-pick/revert of a merge commit. Signed-off-by: Junio C Hamano <gitster@pobox.com>