Skip to content

Commit 5b7a64d

Browse files
dschogitster
authored andcommitted
cherry-pick: add test for --skip advice in git commit
In dcb500d (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 780308d commit 5b7a64d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t3510-cherry-pick-sequence.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ test_expect_success 'revert --skip to skip commit' '
123123
test_expect_success 'skip "empty" commit' '
124124
pristine_detach picked &&
125125
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 &&
127128
git cherry-pick --skip &&
128129
test_cmp_rev dummy HEAD
129130
'

0 commit comments

Comments
 (0)