summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2016-07-21 01:24:12 -0600
committerCarlos Martín Nieto <cmn@dwim.me>2016-07-21 01:24:12 -0600
commitecef50f9305ea819b753add74389dab39ad51572 (patch)
tree142ddbc850486641a3af5606c6f58b5ee536a374
parentf6adbcbfc963b1e18276b719dc108a3da9f41501 (diff)
downloadlibgit2-ecef50f9305ea819b753add74389dab39ad51572.tar.gz
revwalk: reverse bad logic when marking uninteresting
We want to loop until there are no more interesting commits in the array. The reversed logic will stop prematurely leading to incorrect results in cases with nonmonotonic timestamps.
-rw-r--r--src/revwalk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/revwalk.c b/src/revwalk.c
index 4815a1089..1bd5b7e0a 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -86,7 +86,7 @@ static int mark_uninteresting(git_revwalk *walk, git_commit_list_node *commit)
tmp = git_array_pop(pending);
commit = tmp ? *tmp : NULL;
- } while (commit != NULL && !interesting_arr(pending));
+ } while (commit != NULL && interesting_arr(pending));
git_array_clear(pending);