@matheusbsbs / matheus-bagliano / commits / 5b7a64df40
Fork 0

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>

Johannes Schindelin committed Dec 6, 2019 at 16:06 UTC 5b7a64df40bec755b0d9ef477764e45ba72abf7b
1 file changed +2 -1
t/t3510-cherry-pick-sequence.sh
+2 -1
@@ -123,7 +123,8 @@ test_expect_success 'revert --skip to skip commit' '
123 test_expect_success 'skip "empty" commit' '
124 pristine_detach picked &&
125 test_commit dummy foo d &&
126 - test_must_fail git cherry-pick anotherpick &&
126 + test_must_fail git cherry-pick anotherpick 2>err &&
127 + test_i18ngrep "git cherry-pick --skip" err &&
128 git cherry-pick --skip &&
129 test_cmp_rev dummy HEAD
130 '