Patrick Steinhardt <ps@xxxxxx> writes: > We do not currently have any flags when creating reference transactions, > but we'll add one to disable execution of the reference transaction hook > in some cases. > > Allow passing flags to `ref_store_transaction_begin()` to prepare for > this change. > > Signed-off-by: Patrick Steinhardt <ps@xxxxxx> > --- > refs.c | 8 +++++--- > refs.h | 3 ++- > refs/files-backend.c | 10 +++++----- > refs/packed-backend.c | 2 +- > refs/refs-internal.h | 1 + > sequencer.c | 2 +- > 6 files changed, 15 insertions(+), 11 deletions(-) > > diff --git a/refs.c b/refs.c > index 4da4996c4d..7415864b62 100644 > --- a/refs.c > +++ b/refs.c > @@ -800,7 +800,7 @@ int refs_delete_ref(struct ref_store *refs, const char *msg, > struct ref_transaction *transaction; > struct strbuf err = STRBUF_INIT; > > - transaction = ref_store_transaction_begin(refs, &err); > + transaction = ref_store_transaction_begin(refs, 0, &err); Ah, OK, the "later" came soon enough. It wasn't that we wanted to cram multiple calls for "delete" in a single transaction. It was that we wanted to tweak how each transaction works by passing a flag word. > struct ref_transaction *ref_store_transaction_begin(struct ref_store *refs, > + unsigned int flags, > struct strbuf *err) OK. And in this step, everybody passes 0 (i.e. no bit set) to the function.