Commit 12a1790d by Carlos Martín Nieto

revwalk: only check the first commit in the list for an earlier timestamp

This is not a big deal, but it does make us match git more closely by checking
only the first. The lists are sorted already, so there should be no functional
difference other than removing a possible check from every iteration in the
loop.
parent 46f35127
......@@ -388,10 +388,16 @@ static int still_interesting(git_commit_list *list, int64_t time, int slop)
if (!list)
return 0;
/*
* If the destination list has commits with an earlier date than our
* source, we want to reset the slop counter as we're not done.
*/
if (time <= list->item->time)
return SLOP;
for (; list; list = list->next) {
/*
* If the destination list has commits with an earlier date than
* our source or if it still contains interesting commits we
* If the destination list still contains interesting commits we
* want to continue looking.
*/
if (!list->item->uninteresting || list->item->time > time)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment