Commit 3f3d21ba by Vicent Marti

Merge pull request #2417 from libgit2/cmn/revwalk-array-fix

revwalk: more sensible array handling
parents 7064cdaf f9a97667
...@@ -48,7 +48,7 @@ static int mark_uninteresting(git_revwalk *walk, git_commit_list_node *commit) ...@@ -48,7 +48,7 @@ static int mark_uninteresting(git_revwalk *walk, git_commit_list_node *commit)
assert(commit); assert(commit);
git_array_alloc(pending); git_array_init_to_size(pending, 2);
GITERR_CHECK_ARRAY(pending); GITERR_CHECK_ARRAY(pending);
do { do {
...@@ -67,7 +67,7 @@ static int mark_uninteresting(git_revwalk *walk, git_commit_list_node *commit) ...@@ -67,7 +67,7 @@ static int mark_uninteresting(git_revwalk *walk, git_commit_list_node *commit)
tmp = git_array_pop(pending); tmp = git_array_pop(pending);
commit = tmp ? *tmp : NULL; commit = tmp ? *tmp : NULL;
} while (git_array_size(pending) > 0); } while (commit != NULL);
git_array_clear(pending); git_array_clear(pending);
......
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