Re: [PATCH v2 01/10] refs: allow passing flags when setting up a transaction
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Nov 20, 2024, 10:19 UTC
- Message-ID
- <CAP8UFD0xMcqfJT+JnqqFSSiN0QOzsJ7pvQmZ_SXtxz3f5iJVBA@mail.gmail.com>
- In-Reply-To
- <20241120-pks-refs-optimize-migrations-v2-1-a233374b7452@pks.im>
On Wed, Nov 20, 2024 at 8:54 AM Patrick Steinhardt <ps@pks.im> wrote:
Show 6 quoted lines
> > Allow passing flags when setting up a transaction such that the > behaviour of the transaction itself can be altered. This functionality > will be used in a subsequent patch. > > Adapt callers accordingly.
From reading the above, it might seem that the change is only about adding a new 'flags' argument to the ref_store_transaction_begin() function that sets up a transaction. When looking at the patch though, it appears that it's also about adding a 'flags' field to 'struct ref_transaction'. It might be nice to mention that in the commit message too.
Show 10 quoted lines
> diff --git a/refs/refs-internal.h b/refs/refs-internal.h
> index 2313c830d8facaa17b0b4b073df0de958023062a..dbc6360c5a1d410c192e7eee1bffb1d423e1f9ee 100644
> --- a/refs/refs-internal.h
> +++ b/refs/refs-internal.h
> @@ -193,6 +193,7 @@ struct ref_transaction {
> size_t nr;
> enum ref_transaction_state state;
> void *backend_data;
> + unsigned int flags;
> };