diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-09-18 03:03:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-18 03:03:03 +0100 |
commit | e181a649dfd9af86e272605274e645b7725819c4 (patch) | |
tree | c7c1406dbbbc4b725f7645e8e219ce34bac0f129 | |
parent | 744d83886edb002d336c66f41936b6dda64a0f9c (diff) | |
parent | 12a1790d8e71087056d2b2de936ddae439e1d94c (diff) | |
download | libgit2-e181a649dfd9af86e272605274e645b7725819c4.tar.gz |
Merge pull request #4809 from libgit2/cmn/revwalk-sign-regression
Fix revwalk limiting regression
-rw-r--r-- | src/revwalk.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/revwalk.c b/src/revwalk.c index da84a4471..4c5a1dabf 100644 --- a/src/revwalk.c +++ b/src/revwalk.c @@ -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) @@ -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) { int error, slop = SLOP; - int64_t time = ~0ll; + int64_t time = INT64_MAX; git_commit_list *list = commits; git_commit_list *newlist = NULL; git_commit_list **p = &newlist; |