Commit 10cba764a528a631b0261542cffdc02bf3956d75

Etienne Samson 2018-07-06T21:58:34

remote: lower the default vector size to 8 As it is, this is space for 32 refs pointers, which feels a little much. Lower it to 8, as it is the minimum vector size anyway.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/remote.c b/src/remote.c
index ac79ad7..ba4e216 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -261,7 +261,7 @@ static int create_internal(git_remote **out, const char *url, const git_remote_c
 
 	remote->repo = opts->repository;
 
-	if ((error = git_vector_init(&remote->refs, 32, NULL)) < 0 ||
+	if ((error = git_vector_init(&remote->refs, 8, NULL)) < 0 ||
 		(error = canonicalize_url(&canonical_url, url)) < 0)
 		goto on_error;