Skip to content

Commit

Permalink
Merge branch 'kk/revwalk-slop-too-many-commit-within-a-second' into m…
Browse files Browse the repository at this point in the history
…aint-1.8.1

* kk/revwalk-slop-too-many-commit-within-a-second:
  Fix revision walk for commits with the same dates
  • Loading branch information
Junio C Hamano committed Apr 3, 2013
2 parents 67ff3d2 + c19d1b4 commit 6437980
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ static int still_interesting(struct commit_list *src, unsigned long date, int sl
* Does the destination list contain entries with a date
* before the source list? Definitely _not_ done.
*/
if (date < src->item->date)
if (date <= src->item->date)
return SLOP;

/*
Expand Down
13 changes: 13 additions & 0 deletions t/t6009-rev-list-parent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6437980

Please sign in to comment.