cherry-pick/revert: advise using --skip

The previous commit introduced a --skip flag for cherry-pick and
revert. Update the advice messages, to tell users about this less
cumbersome way of skipping commits. Also add tests to ensure
everything is working fine.

Signed-off-by: Rohit Ashiwal <rohit.ashiwal265@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Rohit Ashiwal
2019-07-02 14:41:29 +05:30
committed by Junio C Hamano
parent de81ca3f36
commit dcb500dc16
3 changed files with 34 additions and 8 deletions

View File

@ -172,6 +172,26 @@ test_expect_success 'check advice when we move HEAD by committing' '
test_i18ncmp expect advice
'
test_expect_success 'selectively advise --skip while launching another sequence' '
pristine_detach initial &&
cat >expect <<-EOF &&
error: cherry-pick is already in progress
hint: try "git cherry-pick (--continue | --skip | --abort | --quit)"
fatal: cherry-pick failed
EOF
test_must_fail git cherry-pick picked..yetanotherpick &&
test_must_fail git cherry-pick picked..yetanotherpick 2>advice &&
test_i18ncmp expect advice &&
cat >expect <<-EOF &&
error: cherry-pick is already in progress
hint: try "git cherry-pick (--continue | --abort | --quit)"
fatal: cherry-pick failed
EOF
git reset --merge &&
test_must_fail git cherry-pick picked..yetanotherpick 2>advice &&
test_i18ncmp expect advice
'
test_expect_success 'allow skipping commit but not abort for a new history' '
pristine_detach initial &&
cat >expect <<-EOF &&