summaryrefslogtreecommitdiffstats
path: root/refs.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-11-20 08:51:30 +0100
committerJunio C Hamano <gitster@pobox.com>2024-11-20 23:59:14 +0100
commita0efef144686ca2c46caad98df72507ba2606ce5 (patch)
tree88e9912ac9831141af6569c1b7d1afe21a5facba /refs.h
parentThe eighth batch (diff)
downloadgit-a0efef144686ca2c46caad98df72507ba2606ce5.tar.xz
git-a0efef144686ca2c46caad98df72507ba2606ce5.zip
refs: allow passing flags when setting up a transaction
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. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index 108dfc93b3..9821f3e80d 100644
--- a/refs.h
+++ b/refs.h
@@ -234,7 +234,7 @@ char *repo_default_branch_name(struct repository *r, int quiet);
* struct strbuf err = STRBUF_INIT;
* int ret = 0;
*
- * transaction = ref_store_transaction_begin(refs, &err);
+ * transaction = ref_store_transaction_begin(refs, 0, &err);
* if (!transaction ||
* ref_transaction_update(...) ||
* ref_transaction_create(...) ||
@@ -584,6 +584,7 @@ enum action_on_err {
* be freed by calling ref_transaction_free().
*/
struct ref_transaction *ref_store_transaction_begin(struct ref_store *refs,
+ unsigned int flags,
struct strbuf *err);
/*