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

Re: Specifying N revisions after the initial commit

From
KKKonstantin Khomoutov <kostix+git@007spb.ru>
Date
Sep 22, 2015, 18:40 UTC
Message-ID
<20150922214037.b6b48059f051fcd4060a5a85@domain007.com>
In-Reply-To
<CA+5PVA40x8bxW63X+b77FDO8btRBaVOg=fq+ZyX=bdJ+uEm9gA@mail.gmail.com>

On Tue, 22 Sep 2015 14:32:19 -0400 Josh Boyer <jwboyer@gmail.com> wrote:

> Please CC me as I'm not subscribed.
> 
> I was hoping someone could help me with the revision shorthand to get
> the commit sha of a commit N commits after the initial commit.

What happens if right after the initial commit, there have been five branches created -- with no common commits except for the initial one?

That's the core limitation of the data model Git uses (and arguably any other DVCS system): all commits form a directed acyclic graph. The "directed" in that construct means that child commits contain a link to their parent commit (or commits) but not vice-versa.

Hence, given any particular commit, you're able to trace all of its ancestry, but the reverse is not possible.

Previous: Josh BoyerNext: Josh Boyer
Message 2 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.