From: Patrick Steinhardt <ps@pks.im>
To: Ben Knoble <ben.knoble@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Nico Williams" <nico@cryptonector.com>,
𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣 <velocifyer@velocifyer.com>,
git@vger.kernel.org
Subject: Re: 0-Based indexes for git log
Date: Thu, 25 Sep 2025 07:46:45 +0200 [thread overview]
Message-ID: <aNTXRRolcqn5sT6d@pks.im> (raw)
In-Reply-To: <95F22D6A-38D9-4F4D-B71E-59320B86B4E8@gmail.com>
On Wed, Sep 24, 2025 at 01:28:31PM -0400, Ben Knoble wrote:
> > * merge parent numbers are 2-based (sanity of this statement is
> > already questionable). If HEAD is a merge, HEAD~2 is the
> > "(first) side branch that was merged", HEAD~3 is the "(second)
> > side brnach that was merged (in an octopus merge), and so on.
>
> HEAD^2, 3, etc., rather? :)
Probably. I also always regarded this as the nth parent, not the nth
merge parent. HEAD^1 returns the first parent even for non-merges,
HEAD^2 the second and so on. So I'd claim these are also 1-based.
Patrick
next prev parent reply other threads:[~2025-09-25 5:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 21:15 0-Based indexes for git log 𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣
2025-09-24 2:12 ` Ben Knoble
2025-09-24 13:46 ` 𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣
2025-09-24 15:26 ` Ben Knoble
2025-09-24 5:22 ` Jeff King
2025-09-24 13:42 ` 𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣
2025-09-24 15:43 ` Nico Williams
2025-09-24 16:53 ` Junio C Hamano
2025-09-24 17:11 ` 𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣
2025-09-24 17:28 ` Ben Knoble
2025-09-25 5:46 ` Patrick Steinhardt [this message]
2025-09-25 13:25 ` Junio C Hamano
2025-09-24 17:01 ` 𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣
2025-09-24 17:04 ` Nico Williams
2025-09-24 17:15 ` 𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣
2025-09-24 17:22 ` Emily Shaffer
2025-09-24 17:18 ` 𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣
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=aNTXRRolcqn5sT6d@pks.im \
--to=ps@pks.im \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nico@cryptonector.com \
--cc=velocifyer@velocifyer.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).