Re: [BUG] git rev-list --no-walk A B C sorts by commit date incorrectly
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 8, 2011, 01:00 UTC
- Message-ID
- <7v62u043ba.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CEF26B82-4281-4B8F-A994-DE32EFB92BA7@sb.org>
Kevin Ballard <kevin@sb.org> writes:
> Is there any rationale for this behavior?
Not a rationale, but an explanation is that most of the time we walk the history and sorting by date is the first thing that needs to be done, and the --no-walk option was an afterthought that was tucked in.
I suspect that a three-liner patch to revision.c:prepare_revision_walk() would give you what you want. Instead of calling insert-by-date, you append to the tail when revs->no_walk is given, or something.