From: Junio C Hamano Date: Mon, 10 Aug 2026 17:54:55 GMT Subject: Re: [PATCH v2 3/7] builtin/receive-pack: read unpack limit config lazily Message-ID: In-Reply-To: <20260809190106.1565882-4-jltobler@gmail.com> Justin Tobler writes: > +static int get_unpack_limit(struct repository *repo) > +{ > + static int limit = -1; > + > + if (limit < 0) { > + int receive_limit = -1; > + int transfer_limit = -1; > + > + repo_config_get_int(repo, "receive.unpacklimit", > + &receive_limit); > + repo_config_get_int(repo, "transfer.unpacklimit", > + &transfer_limit); > + > + if (receive_limit >= 0) > + limit = receive_limit; > + else if (transfer_limit >= 0) > + limit = transfer_limit; > + else > + limit = 100; > + } > + > + return limit; > +} I am not sure whether this is progress. A function that defines a 'static int' internally and sets it only once is akin to using a global variable. I wonder whether it would be too much work to add a new member to either 'repo->settings' or 'repo->config_values' to make the setting truly per-repository.