Re: Fix interesting git-rev-list corner case
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jul 30, 2005, 01:20 UTC
- Message-ID
- <Pine.LNX.4.58.0507291816060.29650@g5.osdl.org>
- In-Reply-To
- <20050730001158.GF32263@mythryan2.michonline.com>
On Fri, 29 Jul 2005, Ryan Anderson wrote:
> > Maybe it'd make sense to have the commits refuse to add a commit when it > would be younger than one of it's parents?
No, the git-rev-list thing really was a bug, it was just that I hadn't thought things through when I wrote it, and the "normal" case (ie the ones I had tested) just happened to work because it's a common one.
In other words - I had taken a shortcut without thinking it through.
The date really isn't important - the algorithm I had works fine even if dates are totally screwed up, it just had a stupid bug.
And trying to make the date more important than it is will just inevitably lead to _worse_ problems down the road.
So the date is a good heuristic (we have to traverse the commits in _some_ order, and the date order just happens to be one that ends up giving the minimum number of commits "usually"), but any time we _depend_ on dates one way or the other that would be a good.
Linus