[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: git-rev-list: proper lazy reachability
From:       Linus Torvalds <torvalds () osdl ! org>
Date:       2005-05-31 15:23:47
Message-ID: Pine.LNX.4.58.0505310813540.1876 () ppc970 ! osdl ! org
[Download RAW message or body]



On Tue, 31 May 2005, Linus Torvalds wrote:
> 
> You should never see a parent before a child from git-rev-list.

Actually, I take that back.

A commit that has several children will see _a_ child before the parent is
shown, but while the time-based ordering means that it _likely_ will order
all children before the parent, now that I think about it, that's not
guaranteed to be true. You could have

	      A
	     / \
	    B   |
	     \ /
	      C
	      |
	      D

and if C has a date that is before B, then git-rev-list would traverse the
tree (and show it) in the order A C B.

In fact, even D might be listed before B is (eg, the person who committed
B had a clock that was set to the last century, and so the date on that
was wrong).

The thing is, since B has such an "old" date, the traversal assumes that
it is old and very low down in the tree, and that it's better off parsing
other commits first, so it will never look more closely at B and notice
that it has a parent that has already been parsed.

So I guess you'll have to wait for the end and do the toposort after all. 
Sorry about the confusion on my part.

		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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic