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

Re: Git commit generation numbers

From
Christian Couder <christian.couder@gmail.com>
Date
Jul 22, 2011, 09:30 UTC
Message-ID
<CAP8UFD0FG47D0hV8ifj1p7bRfEXJ7Ez3mTw4Yv-KUWXPJnWLOg@mail.gmail.com>
In-Reply-To
<j0a9te$vcv$1@dough.gmane.org>

On Fri, Jul 22, 2011 at 12:40 AM, Pēteris Kļaviņš <klavins@netspace.net.au> wrote:

Show 9 quoted lines
>
> The beauty of Git is that no two copies of a Git repository as a whole are
> the same:  some people make shallow copies;  others prune away all branches
> except for the one they are interested in;  yet others graft together
> multiple original repositories.  The upshot is that two copies of the same
> repository may end up having different commits as their root commits, and so
> the generation numbers computed for their repositories would be different.
>  Indeed, the shallow repository copy could later be filled out with
> additional underlying commits, and so on.

Not only people want different repos, but with their own repo they want different "views" (or "virtual graph") of it.

> Given this context, I can't see the value in fixing generation numbers
> within commits.  In my mind generation numbers are extremely useful
> transient helper objects in every Git repository but they have no meaning
> outside that repository, sort of like GIT_WORK_TREE.

It's not even per repository that they have a meaning, it's per "view" of the commit graph.

Thanks, Christian.

Previous: Pēteris KļaviņšNext: George Spelvin
Message 6 of 7 in “Re: Git commit generation numbers”
  1. Drew NorthupJul 21, 2011
  2. George SpelvinJul 21, 2011
  3. Drew NorthupJul 21, 2011
  4. Phil HordJul 21, 2011
  5. Pēteris KļaviņšJul 21, 2011
  6. Christian CouderJul 22, 2011
  7. George SpelvinJul 21, 2011

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.