From: Justin Tobler Date: Thu, 09 Jul 2026 15:02:12 GMT Subject: Re: [PATCH v3 08/11] odb/transaction: add transaction env interface Message-ID: In-Reply-To: On 26/07/08 08:36PM, Junio C Hamano wrote: > Justin Tobler writes: > > > +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? Ya, `odb_transaction_files_prepare()` can fail here. In practice, failure results in no temporary directory being created which `tmp_objdir_env()` does handle gracefully, but we should ideally still be reported the failure back to callers. Will update in the next version. -Justin