Subject: Re: [PATCH 1/4] odb: store ODB source in `struct odb_transaction`

From: Justin Tobler <[email-masked]>
Date: Thu, 29 Jan 2026 15:54:28 -0600

On 26/01/29 12:28PM, Junio C Hamano wrote:
> Justin Tobler <[email-masked]> writes:
> 
> > Interestingly, it looks like there are only three users of odb-tmpdir:
> > remerge-diffs, git-recieve-pack, and ODB transactions. All of these
> > use-cases seems like a reasonble fit to create an ODB transaction
> > instead of managing the tmpdir directly. In the case of remerge-diffs
> > the transaction would need to always be aborted. If this is done, then a
> > tmpdir could become an internal detail of the ODB transaction for the
> > files backend.
> 
> ;-)  I agree 100%.
> 
> "Prepare to create objects that may be undone in the end", "Now make
> these objects we created so far as parmanent part of the object
> store", "Reject those objects we created so far as the transaction
> created them is being aborted" are requests at the right abstraction
> level.  "Give me a temporary object directory" is not.

Ok, I'll go ahead and leave the tmp-objdir stuff alone in this patch
series and look into extending the ODB transaction usage to replace
existing tmpdir callsites in a followup series.

Thanks,
-Justin