[PATCH 2/5] Add test for cherry-pick --skip-redundant-commits
- From
David Greene <greened@obbligato.org>
- Date
- Jan 11, 2016, 05:00 UTC
- Message-ID
- <1452488421-26823-3-git-send-email-greened@obbligato.org>
- In-Reply-To
- <1452488421-26823-1-git-send-email-greened@obbligato.org>
From: "David A. Greene" <greened@obbligato.org>
Test that --skip-redundant commits suppresses an abort when cherry-picking a redundant commit.
Signed-off-by: David A. Greene <greened@obbligato.org> --- t/t3514-cherry-pick-redundant.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 t/t3514-cherry-pick-redundant.sh
diff --git a/t/t3514-cherry-pick-redundant.sh b/t/t3514-cherry-pick-redundant.sh new file mode 100755 index 0000000..c433344 --- /dev/null +++ b/t/t3514-cherry-pick-redundant.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +test_description='git cherry-pick tests for redundant commits + +This test runs git cherry-pick and tests handling of redundant commits. +' +. ./test-lib.sh + +test_expect_success 'setup' ' + test_commit one && + test_commit two && + test_commit three +' + +test_expect_success 'cherry-pick redundant commit fails' ' + git branch test-start && + git reset --hard HEAD~2 && + git cherry-pick test-start && + test_must_fail git cherry-pick test-start +' + +test_expect_success 'cherry-pick with --skip-redundant-commits' ' + git cherry-pick --skip-redundant-commits test-start +' + +test_done
-- 2.6.1