From: Justin Tobler Date: Mon, 29 Jun 2026 19:20:03 GMT Subject: Re: [PATCH 5/6] odb/transaction: add transaction env interface Message-ID: In-Reply-To: On 26/06/24 01:26PM, Patrick Steinhardt wrote: > On Tue, Jun 23, 2026 at 11:19:19PM -0500, Justin Tobler wrote: > > The ODB transaction backend is responsible for creating/managing its own > > staging area for writing objects. Other child processes spawned by Git > > may need to access to uncommitted objects or write new objects in the > > s/may need to access to/may need access to/ Will fix. > > staging area though. > > > > Introduce `odb_transaction_env()` which is expected to provide the set > > of environment variables needed by a child process to access the > > transaction staging area. > > Possessive s is missing, I think. Yes. :) [snip] > > + > > + /* > > + * This callback is expected to return a NULL-terminated array of > > + * environment variables that a child process should inherit so > > + * that its object writes participate in the transaction. The > > + * returned array is owned by the backend and remains valid until > > + * the transaction ends. May return NULL when the backend does not > > + * need to expose any state to child processes. > > + */ > > + const char **(*env)(struct odb_transaction *transaction); > > Would it make more sense to adapt this function so that: > > - It receives a `struct strvec` as input that the environment > variables are to be amended to. > > - It returns a normal error code to indicate errors? Ya, that is probably a more sensible interface as it would be nice to be able to signal an error. Will do in the next version. Thanks, -Justin