summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-07-24 16:46:59 +0200
committerVicent Marti <tanoku@gmail.com>2014-08-05 02:09:37 +0200
commitf3f9dc075ec27935185d7f576515782416ae3cb6 (patch)
tree9f523c182bf15ae25923f3a75468691490f3bfb3
parent440a87a119568077fe771461152b0246782d30f7 (diff)
downloadlibgit2-f3f9dc075ec27935185d7f576515782416ae3cb6.tar.gz
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.
-rw-r--r--src/revwalk.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/revwalk.c b/src/revwalk.c
index 530c9705..bd07d02c 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -48,9 +48,6 @@ static int mark_uninteresting(git_revwalk *walk, git_commit_list_node *commit)
assert(commit);
- git_array_init_to_size(pending, 2);
- GITERR_CHECK_ARRAY(pending);
-
do {
commit->uninteresting = 1;