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 <martinvonz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Martin von Zweigbergk 2012-08-28 23:15:55 -07:00 committed by Junio C Hamano
parent ca92e59e30
commit d023c248a3
1 changed files with 15 additions and 0 deletions

View File

@ -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