Re: [PATCH v3 08/11] odb/transaction: add transaction env interface
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 9, 2026, 03:36 UTC
- Message-ID
- <xmqqbjcgrg0e.fsf@gitster.g>
- In-Reply-To
- <20260708235925.3992097-9-jltobler@gmail.com>
Justin Tobler <jltobler@gmail.com> writes:
Show 7 quoted lines
> +static int odb_transaction_files_env(struct odb_transaction *base,
> + struct strvec *env)
> +{
> + struct odb_transaction_files *transaction =
> + container_of(base, struct odb_transaction_files, base);
> +
> + odb_transaction_files_prepare(&transaction->base);Can this fail? The caller of us would not notice that something went wrong, and ...
> + strvec_pushv(env, tmp_objdir_env(transaction->objdir));
... happily ends up using transaction->objdir that may not be appropriate for it to use if it fails, no?
> + return 0; > +}