Re: Add "--show-all" revision walker flag for debugging

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Johannes Schindelin <Johannes.Schindelin@...>, Nicolas Pitre <nico@...>, Junio C Hamano <gitster@...>, Git Mailing List <git@...>
Date: Sunday, February 10, 2008 - 6:53 pm

On Sat, 10 Feb 2008, Linus Torvalds wrote:

Well, "generation" number alone would work quote well as an exclusion
mechanism; generation + roots would work better, I think.

Lets take for an example the following revision graph:

roots: a    a    a    aA   aA
gen:   1    2    3    4    5

       a----b----c----d----e
                     /
            A----B--/

gen:        1    2
roots:      A    A

For example lone generation number is enough to decide that 'c'
(generation 3) cannot be reached from 'a' (generation 1 < 3), and
that 'c' (generation 3) cannot be reached from 'B' (generation 2 < 3).
Roots allow for easy check that 'B' (gen: 2, roots: A) cannot be
reached from 'c' (roots: a, and A \not\in a), but can be reached
from 'e' (gen: 5 > 2, roots: aA \ni a).

What I don't know if generation number would be enough to avoid
"going to root" or "going to common ancestor" costly case when
calculating excluded commits.


While this information can be calculated from revision graph it is
I think costly enough that it truly would be better to have it in
commit object.

Well, we could always start using core.repositoryFormatVersion ;-)


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".

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.


[*1*] If I understand math correctly it would limit us in theory to
up to 64 roots (git.git has 8 roots IIRC).
-- 
Jakub Narebski
Poland
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Add "--show-all" revision walker flag for debugging, Linus Torvalds, (Sat Feb 9, 6:02 pm)
Re: Add "--show-all" revision walker flag for debugging, Johannes Schindelin, (Sat Feb 9, 9:12 pm)
Re: Add "--show-all" revision walker flag for debugging, Nicolas Pitre, (Sat Feb 9, 9:28 pm)
Re: Add "--show-all" revision walker flag for debugging, Johannes Schindelin, (Sat Feb 9, 9:30 pm)
Re: Add "--show-all" revision walker flag for debugging, Jakub Narebski, (Sun Feb 10, 4:17 pm)
Re: Add "--show-all" revision walker flag for debugging, Linus Torvalds, (Sun Feb 10, 4:50 pm)
Re: Add "--show-all" revision walker flag for debugging, Jakub Narebski, (Sun Feb 10, 6:53 pm)
Re: Add "--show-all" revision walker flag for debugging, Linus Torvalds, (Sun Feb 10, 7:11 pm)
Re: Add "--show-all" revision walker flag for debugging, Jakub Narebski, (Sun Feb 10, 9:24 pm)
Re: Add "--show-all" revision walker flag for debugging, Linus Torvalds, (Mon Feb 11, 11:59 am)
Re: Add "--show-all" revision walker flag for debugging, Nicolas Pitre, (Mon Feb 11, 12:39 pm)
Re: Add "--show-all" revision walker flag for debugging, Jakub Narebski, (Mon Feb 11, 12:26 pm)
Re: Add "--show-all" revision walker flag for debugging, Nicolas Pitre, (Sun Feb 10, 9:59 pm)
Re: Add "--show-all" revision walker flag for debugging, Nicolas Pitre, (Sun Feb 10, 5:04 pm)
Re: Add "--show-all" revision walker flag for debugging, Linus Torvalds, (Sat Feb 9, 9:22 pm)
Re: Add "--show-all" revision walker flag for debugging, Junio C Hamano, (Sun Feb 10, 12:09 am)
Re: Add "--show-all" revision walker flag for debugging, Junio C Hamano, (Sun Feb 10, 12:21 am)
Re: Add "--show-all" revision walker flag for debugging, Johannes Schindelin, (Sat Feb 9, 9:29 pm)
Re: Add "--show-all" revision walker flag for debugging, Linus Torvalds, (Sat Feb 9, 7:52 pm)
Re: Add "--show-all" revision walker flag for debugging, Junio C Hamano, (Sun Feb 10, 12:44 am)