]> git.ipfire.org Git - thirdparty/git.git/commit - server-info.c
server-info: drop nr_alloc struct member
authorJeff King <peff@peff.net>
Fri, 5 Apr 2019 18:14:00 +0000 (14:14 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Apr 2019 07:58:21 +0000 (16:58 +0900)
commit79bb8b3c80b902f43d2bc7cdf3afa2ffc2668c32
tree7260ea5897976f4962deb376fda3478cff7d7744
parent4ecbd6492cde3fcf003c387414b3e9983fb2ba4b
server-info: drop nr_alloc struct member

We keep an array of struct pointers, with each one representing a single
packfile. But for some reason there is a nr_alloc parameter inside each
struct, which has never been used.

This is probably cruft left over from development, where we might have
wanted a nr_alloc to dynamically grow the list. But as it turns out, we
do not dynamically grow the list at all, but rather count up the total
number of packs and use that as a maximum size. So while we're thinking
of this, let's add an assert() that documents (and checks!) that our
allocation and fill loops stay in sync.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
server-info.c