X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3506-cherry-pick-ff.sh;h=51ca391e472441d2d503e721795d609bfaad1100;hb=edc54fb5d4ce6774fc2ac76779bd57dc2d6ab189;hp=e17ae712b1078333fa191b97764177016bc01b84;hpb=c00cf45fa35d8aaa31c479ae7502286837fc4dc6;p=git.git diff --git a/t/t3506-cherry-pick-ff.sh b/t/t3506-cherry-pick-ff.sh index e17ae712b..51ca391e4 100755 --- a/t/t3506-cherry-pick-ff.sh +++ b/t/t3506-cherry-pick-ff.sh @@ -95,4 +95,14 @@ test_expect_success 'cherry pick a merge relative to nonexistent parent with --f test_must_fail git cherry-pick --ff -m 3 C ' +test_expect_success 'cherry pick a root commit with --ff' ' + git reset --hard first -- && + git rm file1 && + echo first >file2 && + git add file2 && + git commit --amend -m "file2" && + git cherry-pick --ff first && + test "$(git rev-parse --verify HEAD)" = "1df192cd8bc58a2b275d842cede4d221ad9000d1" +' + test_done