From: Junio C Hamano <gitster@pobox•com>
To: Jon Forrest <nobozo@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: How Does "git log --reverse" Work?
Date: Tue, 30 Dec 2025 11:04:42 +0900 [thread overview]
Message-ID: <xmqqy0mkhghx.fsf@gitster.g> (raw)
In-Reply-To: <16fc8ecb-01f7-4056-be58-e3aa20345f77@gmail.com> (Jon Forrest's message of "Mon, 29 Dec 2025 16:18:55 -0800")
Jon Forrest <nobozo@gmail•com> writes:
> I've looked at the code but it's not well commented.
> Does the answer have something to do with commit lists?
What revision.c:get_revision() does should be fairly obvious.
When the .reverse option is in effect, it grabs all the commits it
needs to show (with the usual traversal, as if .reverse were not in
effect, by calling get_revision_internal()), queues it in the
.commits list, goes into the reverse output stage, where we output
what we queued earlier. After that, we yield commits from that
queue.
prev parent reply other threads:[~2025-12-30 2:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 0:18 How Does "git log --reverse" Work? Jon Forrest
2025-12-30 2:04 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqy0mkhghx.fsf@gitster.g \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=nobozo@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox