Re: Git commit generation numbers
From: Drew Northup <hidden>
Date: 2016-06-15 22:51:37
On Thu, 2011-07-21 at 08:55 -0400, George Spelvin wrote:
quoted
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