mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-05 06:09:59 +00:00
Merge pull request #2417 from libgit2/cmn/revwalk-array-fix
revwalk: more sensible array handling
This commit is contained in:
commit
3f3d21badd
@ -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)
|
|||||||
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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user