Unverified Commit e181a649 by Edward Thomson Committed by GitHub

Merge pull request #4809 from libgit2/cmn/revwalk-sign-regression

Fix revwalk limiting regression
parents 744d8388 12a1790d
...@@ -388,10 +388,16 @@ static int still_interesting(git_commit_list *list, int64_t time, int slop) ...@@ -388,10 +388,16 @@ static int still_interesting(git_commit_list *list, int64_t time, int slop)
if (!list) if (!list)
return 0; 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) { for (; list; list = list->next) {
/* /*
* If the destination list has commits with an earlier date than * If the destination list still contains interesting commits we
* our source or if it still contains interesting commits we
* want to continue looking. * want to continue looking.
*/ */
if (!list->item->uninteresting || list->item->time > time) if (!list->item->uninteresting || list->item->time > time)
...@@ -405,7 +411,7 @@ static int still_interesting(git_commit_list *list, int64_t time, int slop) ...@@ -405,7 +411,7 @@ static int still_interesting(git_commit_list *list, int64_t time, int slop)
static int limit_list(git_commit_list **out, git_revwalk *walk, git_commit_list *commits) static int limit_list(git_commit_list **out, git_revwalk *walk, git_commit_list *commits)
{ {
int error, slop = SLOP; int error, slop = SLOP;
int64_t time = ~0ll; int64_t time = INT64_MAX;
git_commit_list *list = commits; git_commit_list *list = commits;
git_commit_list *newlist = NULL; git_commit_list *newlist = NULL;
git_commit_list **p = &newlist; git_commit_list **p = &newlist;
......
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