Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kornet <draenog@pld-linux.org>2013-03-22 22:38:19 +0400
committerJunio C Hamano <gitster@pobox.com>2013-03-23 03:15:48 +0400
commitc19d1b4e840535c5fc27077194e8ac219c02644c (patch)
treeff7664c14ec5cd8dd0548b285b916771455f2c74 /t/t6009-rev-list-parent.sh
parent15999998fbda60552742275570947431b57108ae (diff)
Fix revision walk for commits with the same dates
Logic in still_interesting function allows to stop the commits traversing if the oldest processed commit is not older then the youngest commit on the list to process and the list contains only commits marked as not interesting ones. It can be premature when dealing with a set of coequal commits. For example git rev-list A^! --not B provides wrong answer if all commits in the range A..B had the same commit time and there are more then 7 of them. To fix this problem the relevant part of the logic in still_interesting is changed to: the walk can be stopped if the oldest processed commit is younger then the youngest commit on the list to processed. Signed-off-by: Kacper Kornet <draenog@pld-linux.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6009-rev-list-parent.sh')
-rwxr-xr-xt/t6009-rev-list-parent.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh
index 30507407ff..66cda17ef3 100755
--- a/t/t6009-rev-list-parent.sh
+++ b/t/t6009-rev-list-parent.sh
@@ -133,4 +133,17 @@ test_expect_success 'dodecapus' '
check_revlist "--min-parents=13" &&
check_revlist "--min-parents=4 --max-parents=11" tetrapus
'
+
+test_expect_success 'ancestors with the same commit time' '
+
+ test_tick_keep=$test_tick &&
+ for i in 1 2 3 4 5 6 7 8; do
+ test_tick=$test_tick_keep
+ test_commit t$i
+ done &&
+ git rev-list t1^! --not t$i >result &&
+ >expect &&
+ test_cmp expect result
+'
+
test_done