Re: [PATCH v2 2/3] demonstrate broken 'git cherry-pick three one two'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 30, 2012, 21:02 UTC
- Message-ID
- <7vehmoqek2.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1346220956-25034-3-git-send-email-martinvonz@gmail.com>
Martin von Zweigbergk <martinvonz@gmail.com> writes:
Show 30 quoted lines
> 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> > --- > t/t3508-cherry-pick-many-commits.sh | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh > index 75f7ff4..fff20c3 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 $A == $B" is not POSIX. I'll drop '=' when queuing, so no need to resend.
Thanks.
> + > test_expect_success 'output to keep user entertained during multi-pick' ' > cat <<-\EOF >expected && > [master OBJID] second