Re: Add "--show-all" revision walker flag for debugging
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Feb 10, 2008, 23:11 UTC
- Message-ID
- <alpine.LFD.1.00.0802101507100.2896@woody.linux-foundation.org>
- In-Reply-To
- <200802102353.40230.jnareb@gmail.com>
On Sun, 10 Feb 2008, Jakub Narebski wrote:
Show 5 quoted lines
> > Well, we could always add it as a local (per repository) "cache". > With only generation numbers we could use pack-index-like format > to store a mapping "commit sha-1 => generation number", just like > now pack index stores mapping "object sha-1 => offset in pack".
Yes, and even embedding this in the pack-file (or perhaps, the index, as a new index extension) is probably a good idea.
> If we want to store also roots, we could either map > "commit sha-1 => generation number, roots set offset / id" (constant > length value)[*1*], or have gen-*.gen file with generation numbers > and roots, and gen-*.idx as index to that file.
The thing is, the roots are almost never actually interesting. Very seldom do you have any issue with different commits having different roots. So I really don't think it's worth it, considering that it's also much more complicated than just adding a sequence number to each commit.
Linus