Skip to content

Commit f3f9dc0

Browse files
carlosmnVicent Marti
authored andcommitted
revwalk: remove preallocation of the uninteresting commits
Preallocating two commits doesn't make much sense as leaving allocation to the first array usage will allocate a sensible size with room for growth. This preallocation has also been hiding issues with strict aliasing in the tests, as we have fairly simple histories and never trigger the growth.
1 parent 440a87a commit f3f9dc0

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/revwalk.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ static int mark_uninteresting(git_revwalk *walk, git_commit_list_node *commit)
4848

4949
assert(commit);
5050

51-
git_array_init_to_size(pending, 2);
52-
GITERR_CHECK_ARRAY(pending);
53-
5451
do {
5552
commit->uninteresting = 1;
5653

0 commit comments

Comments
 (0)