From 7d004199d134c9d465e013064f72dbc04507f6c0 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 17 Mar 2008 18:56:33 -0700 Subject: Make revision limiting more robust against occasional bad commit dates The revision limiter uses the commit date to decide when it has seen enough commits to finalize the revision list, but that can get confused if there are incorrect dates far in the past on some commits. This makes the logic a bit more robust by - we always walk an extra SLOP commits from the source list even if we decide that the source list is probably all done (unless the source is entirely empty, of course, because then we really can't do anything at all) - we keep track of the date of the last commit we added to the destination list (this will *generally* be the oldest entry we've seen so far) - we compare that with the youngest entry (the first one) of the source list, and if the destination is older than the source, we know we want to look at the source. which causes occasional date mishaps to be handled cleanly. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- t/t6009-rev-list-parent.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t6009-rev-list-parent.sh') diff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh index f248a3293..c8a96a9a9 100755 --- a/t/t6009-rev-list-parent.sh +++ b/t/t6009-rev-list-parent.sh @@ -27,7 +27,7 @@ test_expect_success setup ' git log --pretty=oneline --abbrev-commit ' -test_expect_failure 'one is ancestor of others and should not be shown' ' +test_expect_success 'one is ancestor of others and should not be shown' ' git rev-list one --not four >result && >expect && -- cgit v1.2.1