Re: [PATCH v2 09/11] odb/transaction: introduce ODB transaction flags
From: Justin Tobler <hidden>
Date: 2026-07-08 17:34:31
On 26/07/08 08:41AM, Patrick Steinhardt wrote:
On Tue, Jul 07, 2026 at 11:14:10PM -0500, Justin Tobler wrote:quoted
+/* Flags used to configure an ODB transaction. */ +enum odb_transaction_flags { + /* Configures the transaction for use with git-receive-pack(1). */ + ODB_TRANSACTION_RECEIVE = (1 << 0), +}; + /* * Starts an ODB transaction and returns it via `out`. Subsequent objects are * written to the transaction and not committed until odb_transaction_commit()And this is the reason you have to add the include, so that the flags are visible in both "odb/source.h" and in "odb/transaction.h". This makes me wonder whether there's really much value in having this header here be split out of "odb/source.h".
Ya, I've started wondering the same thing. A transaction implementation
is always going to be tightly coupled to the ODB source it pertains too.
It probably makes sense to merge "odb/transaction.{c,h}" with
"odb/source.{c,h}". I'll leave it as-is for now and likely explore this
is a future series though.
-Justin