From: Martin von Zweigbergk Date: Wed, 29 Aug 2012 06:15:55 +0000 (-0700) Subject: demonstrate broken 'git cherry-pick three one two' X-Git-Tag: v1.7.12.1~13^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d023c248a39a7ac3ee226e34eadcee6913913f2f;p=git.git demonstrate broken 'git cherry-pick three one two' Cherry-picking commits out of order (w.r.t. commit time stamp) doesn't currently work. Add a test case to demonstrate it. Signed-off-by: Martin von Zweigbergk Signed-off-by: Junio C Hamano --- diff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh index 75f7ff4f2..afda2d582 100755 --- a/t/t3508-cherry-pick-many-commits.sh +++ b/t/t3508-cherry-pick-many-commits.sh @@ -44,6 +44,21 @@ test_expect_success 'cherry-pick first..fourth works' ' check_head_differs_from fourth ' +test_expect_failure 'cherry-pick three one two works' ' + git checkout -f first && + test_commit one && + test_commit two && + test_commit three && + git checkout -f master && + git reset --hard first && + git cherry-pick three one two && + git diff --quiet three && + git diff --quiet HEAD three && + test "$(git log --reverse --format=%s first..)" = "three +one +two" +' + test_expect_success 'output to keep user entertained during multi-pick' ' cat <<-\EOF >expected && [master OBJID] second