Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-12-06 19:06:07 +0300
committerJunio C Hamano <gitster@pobox.com>2019-12-06 20:32:01 +0300
commit5b7a64df40bec755b0d9ef477764e45ba72abf7b (patch)
tree040356b766059a1b153b5848dac8e2c4557cc9de /t/t3510-cherry-pick-sequence.sh
parent780308d060b2756ed52913ad2c1328c0d7049c05 (diff)
cherry-pick: add test for `--skip` advice in `git commit`
In dcb500dc16c (cherry-pick/revert: advise using --skip, 2019-07-02), `git commit` learned to suggest to run `git cherry-pick --skip` when trying to cherry-pick an empty patch, but that was never tested for. Here is a test that verifies that a message is given to the user that contains the correct invocation. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3510-cherry-pick-sequence.sh')
-rwxr-xr-xt/t3510-cherry-pick-sequence.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t3510-cherry-pick-sequence.sh b/t/t3510-cherry-pick-sequence.sh
index 793bcc7fe3..5b94fdaa67 100755
--- a/t/t3510-cherry-pick-sequence.sh
+++ b/t/t3510-cherry-pick-sequence.sh
@@ -123,7 +123,8 @@ test_expect_success 'revert --skip to skip commit' '
test_expect_success 'skip "empty" commit' '
pristine_detach picked &&
test_commit dummy foo d &&
- test_must_fail git cherry-pick anotherpick &&
+ test_must_fail git cherry-pick anotherpick 2>err &&
+ test_i18ngrep "git cherry-pick --skip" err &&
git cherry-pick --skip &&
test_cmp_rev dummy HEAD
'