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

Re: Git commit generation numbers

From
Drew Northup <drew.northup@maine.edu>
Date
Jul 21, 2011, 15:57 UTC
Message-ID
<1311263869.9745.72.camel@drew-northup.unet.maine.edu>
In-Reply-To
<20110721125544.26006.qmail@science.horizon.com>
On Thu, 2011-07-21 at 08:55 -0400, George Spelvin wrote:
Show 13 quoted lines
> > I have not read yet one discussion about how generation numbers [baked
> > into a commit] deal with rebasing, for instance. Do we assign one more
> > than the revision prior to the base of the rebase operation or do we
> > start with the revision one after the highest of those original commits
> > included in the rebase? Depending on how that is done
> > _drastically_different_ numbers can come out of different repository
> > instances for the same _final_ DAG. This is one major reason why, as I
> > see it, local storage is good for generation numbers and putting them in
> > the commit is bad. 
> 
> Er, no.  Whenever a new commit object is generated (as the result
> of a rebase or not), its commit number is computed based on its
> parent commits.  It is NEVER copied.
I don't see the word "copy" in my original. 
B-O1-O2-O3-O4-O5-O6
 \
  R1----R2-------R3

What's the correct generation number for R3? I would say gen(B)+3. My reading of the posts made by some others was that they thought gen(O6) was the correct answer. Still others seemed to indicate gen(O6)+1 was the correct answer. I don't think everybody MEANT to be saying such different things--that's just how they appeared on this end.

Now, did you mean something different by "commit number?"
-- 
-Drew Northup
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
Previous: George SpelvinNext: Phil Hord
Message 3 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.