summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorKacper Kornet <draenog@pld-linux.org>2013-03-22 19:38:19 +0100
committerJunio C Hamano <gitster@pobox.com>2013-03-22 16:15:48 -0700
commitc19d1b4e840535c5fc27077194e8ac219c02644c (patch)
treeff7664c14ec5cd8dd0548b285b916771455f2c74 /revision.c
parent15999998fbda60552742275570947431b57108ae (diff)
downloadgit-c19d1b4e840535c5fc27077194e8ac219c02644c.tar.gz
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 'revision.c')
-rw-r--r--revision.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index 68545c8015..6a9a8b3c80 100644
--- a/revision.c
+++ b/revision.c
@@ -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;
/*