git-rev-list: proper lazy reachability

From: Linus Torvalds <torvalds@osdl.org>
Date: 2005-05-31 11:58:37
Ok, I just made git-rev-list DTRT when you pass it a "beginning" and 
"end", ie it does proper reachability analysis _without_ parsing the whole 
set of commits. 

It's probably buggy, so don't get too excited, but it seems to give the 
right results for something like

	git-rev-list v2.6.12-rc5 v2.6.12-rc4

which is basically "give me a rev-list of everything that is in rc5 but is 
not in rc4".

So now "git-rev-list a b" should be equivalent to "git-rev-tree a ^b", 
except it's faster, and it doesn't print out anything else.

Because it doesn't need to go all the way back to the root (only far 
enough back to be able to determine that there can be no more unreachable 
entries), it should be constant-time in the total history size. Doesn't 
matter if you've got a million revisions, if you asked for the difference 
between two "close" ones, it will be fast.

Somebody should probably take a look at my simplistic algorithm, since it 
can probably be improved upon and/or fixed for corner-cases.

		Linus
-
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
Received on Tue May 31 11:56:54 2005

This archive was generated by hypermail 2.1.8 : 2005-05-31 11:56:55 EST