Re: [PATCH v4 9/9] odb/transaction: add transaction interface to write packfiles
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Aug 20, 2026, 06:46 UTC
- Message-ID
- <aoaiz7M1oGboydY4@pks.im>
- In-Reply-To
- <20260819215311.3880274-10-jltobler@gmail.com>
On Wed, Aug 19, 2026 at 04:53:11PM -0500, Justin Tobler wrote:
> diff --git a/object-file.c b/object-file.c > index db63587f6d..265c5f7a3c 100644 > --- a/object-file.c > +++ b/object-file.c
[snip]
Show 13 quoted lines
> +static unsigned int get_unpack_limit(struct repository *repo,
> + enum odb_transaction_flags flags)
> +{
> + unsigned int limit = 0;
> +
> + if (flags & ODB_TRANSACTION_RECEIVE) {
> + limit = 100;
> + repo_config_get_uint(repo, "transfer.unpacklimit", &limit);
> + repo_config_get_uint(repo, "receive.unpacklimit", &limit);
> + }
> +
> + return limit;
> +}Okay, instead of assuming that we're running in git-receive-pack(1) we now pass this information along via the flags so that we can pick the correct limit for the given operation. That's somewhat pointless right now as no other operations use this infra yet, but the upside is that it makes it obvious for how to extend the mechanism going forward.
Also, we no longer cache the value and the logic to derive it has become a lot simpler. Good.
Patrick