public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jon Forrest <nobozo@gmail•com>
To: git@vger•kernel.org
Subject: How Does "git log --reverse" Work?
Date: Mon, 29 Dec 2025 16:18:55 -0800	[thread overview]
Message-ID: <16fc8ecb-01f7-4056-be58-e3aa20345f77@gmail.com> (raw)

I'm trying to understand how 'git log --reverse' displays
commits in reverse order (i.e. oldest commit first).

The fact that each commit object has pointer(s) to parent
object(s) makes it trivial to go newest to oldest.
But, I haven't found a way to go oldest to newest.

I've looked at the code but it's not well commented.
Does the answer have something to do with commit lists?

Any advice would be appreciated.

Cordially,
Jon Forrest


             reply	other threads:[~2025-12-30  0:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-30  0:18 Jon Forrest [this message]
2025-12-30  2:04 ` How Does "git log --reverse" Work? Junio C Hamano

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=16fc8ecb-01f7-4056-be58-e3aa20345f77@gmail.com \
    --to=nobozo@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /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