Re: [BUG] multi-commit cherry-pick messes up the order of commits
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 12, 2012, 18:25 UTC
- Message-ID
- <7vaa5s3hiq.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CALkWK0=Mv_tzNw-hN_9fAr+vABappndEK5iSWQHDk8Yk6Z-stw@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
> What are your thoughts on making it a flag in the revision API to be > activated with "cherry-pick --literal-order commit1 commit3 commit2" > or similar?
That is an insane UI for the sake of flexibility.
You should be able to look at revs->cmdline and tell if you need to let cherry-pick walk (i.e. "cherry-pick master..next"), or if the user wants individual commits (i.e. "cherry-pick A B C").
And you do prepare_revision_walk() only when you need to walk; otherwise you use the contents of revs->pending in order.