Skip to content

Commit 74bd526

Browse files
committed
Merge branch 'kk/revwalk-slop-too-many-commit-within-a-second'
Allow the revision "slop" code to look deeper while commits with exactly the same timestamps come next to each other (which can often happen after a large "am" and "rebase" session). * kk/revwalk-slop-too-many-commit-within-a-second: Fix revision walk for commits with the same dates
2 parents 4806c8c + c19d1b4 commit 74bd526

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

revision.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ static int still_interesting(struct commit_list *src, unsigned long date, int sl
709709
* Does the destination list contain entries with a date
710710
* before the source list? Definitely _not_ done.
711711
*/
712-
if (date < src->item->date)
712+
if (date <= src->item->date)
713713
return SLOP;
714714

715715
/*

t/t6009-rev-list-parent.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,17 @@ test_expect_success 'dodecapus' '
133133
check_revlist "--min-parents=13" &&
134134
check_revlist "--min-parents=4 --max-parents=11" tetrapus
135135
'
136+
137+
test_expect_success 'ancestors with the same commit time' '
138+
139+
test_tick_keep=$test_tick &&
140+
for i in 1 2 3 4 5 6 7 8; do
141+
test_tick=$test_tick_keep
142+
test_commit t$i
143+
done &&
144+
git rev-list t1^! --not t$i >result &&
145+
>expect &&
146+
test_cmp expect result
147+
'
148+
136149
test_done

0 commit comments

Comments
 (0)