git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Specifying N revisions after the initial commit

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 22, 2015, 19:55 UTC
Message-ID
<xmqqpp1a2pql.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CA+5PVA6YWJizRjseeJ4EpRya0Mpyrv3DoNsB3=Gi=dOiAoDfHg@mail.gmail.com>
Josh Boyer <jwboyer@gmail.com> writes:
Show 7 quoted lines
> On Tue, Sep 22, 2015 at 2:40 PM, Konstantin Khomoutov
> ...
>> Hence, given any particular commit, you're able to trace all of its
>> ancestry, but the reverse is not possible.
>
> That makes sense.  I suppose I will have to resort to parsing output
> of git-rev-list or something.  Thanks for the reminder.

I think Konstantin explained why it fundamentally does not make sense to ask "which one is the Nth one after the root". I am not sure how running rev-list and count its output would help, unless you are now solving a different problem (perhaps "find all the ones that are Nth after some root", which does have an answer).

Previous: Josh BoyerNext: Josh Boyer
Message 4 of 7 in “Specifying N revisions after the initial commit”
  1. Josh BoyerSep 22, 2015
  2. Konstantin KhomoutovSep 22, 2015
  3. Josh BoyerSep 22, 2015
  4. Junio C HamanoSep 22, 2015
  5. Josh BoyerSep 22, 2015
  6. Theodore Ts'oSep 22, 2015
  7. Junio C HamanoSep 22, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.