Re: 0-Based indexes for git log
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 25, 2025, 13:25 UTC
- Message-ID
- <xmqqcy7eis02.fsf@gitster.g>
- In-Reply-To
- <95F22D6A-38D9-4F4D-B71E-59320B86B4E8@gmail.com>
Ben Knoble <ben.knoble@gmail.com> writes:
Show 6 quoted lines
>> * 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? :)
Thanks for correcting me. Yes. And HEAD^1 is the first parent that is the same as HEAD~1.