Skip to content

Commit

Permalink
demonstrate broken 'git cherry-pick three one two'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin von Zweigbergk authored and Junio C Hamano committed Aug 30, 2012
1 parent ca92e59 commit d023c24
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions t/t3508-cherry-pick-many-commits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d023c24

Please sign in to comment.