Re: Git commit generation numbers
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jul 14, 2011, 18:55 UTC
- Message-ID
- <CA+55aFzvib7QF-J3fBj2brcQifXGqoeK1t7vfx6pcJmJAEO0dw@mail.gmail.com>
- In-Reply-To
- <CA+55aFwuK+krTA4OcnYhLXtKM5HQ1yuPK+J_vC-5R7AthrHWbg@mail.gmail.com>
On Thu, Jul 14, 2011 at 11:47 AM, Linus Torvalds <torvalds@linux-foundation.org> wrote:
Show 5 quoted lines
> > Also, I suspect that the cache could easily be done as a *small* and > *incomplete* cache, ie you don't need to cache all commits, it would > be sufficient to cache a few hundred spread-out commits, and just know > that "from any commit, the cached commit will be quickly reachable".
Put another way: we could do the cache not as a real dynamic entity, but as something that gets generated at "git clone" time or when re-packing.
I'm actually much more nervous about a cache being inconsistent than I would be about having generation numbers in the tree. The latter we can (and should - but my patch didn't) add a fsck test for, and then you would never get into some situation where there's some really subtle issue with merge base calculation due to a corrupt cache.
Linus