Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2022-01-17 11:12:35 +0300
committerJunio C Hamano <gitster@pobox.com>2022-01-17 22:01:44 +0300
commitfbe73f61cbc29f6c4a85478cf792c37dbe5aa26c (patch)
treeadd2e8fdb417d7201cba189e43b9a1dd95074aa2 /refs.h
parent69840cc0f7b4f3352903bd2b8f3de7077916c26b (diff)
refs: allow passing flags when beginning transactions
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@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 92360e55a2..31f7bf9642 100644
--- a/refs.h
+++ b/refs.h
@@ -231,7 +231,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(...) ||
@@ -573,6 +573,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);
struct ref_transaction *ref_transaction_begin(struct strbuf *err);