summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--refs.c3
-rw-r--r--refs.h5
2 files changed, 8 insertions, 0 deletions
diff --git a/refs.c b/refs.c
index 7415864b62..526bf5ed97 100644
--- a/refs.c
+++ b/refs.c
@@ -2084,6 +2084,9 @@ static int run_transaction_hook(struct ref_transaction *transaction,
const char *hook;
int ret = 0, i;
+ if (transaction->flags & REF_TRANSACTION_SKIP_HOOK)
+ return 0;
+
hook = find_hook("reference-transaction");
if (!hook)
return ret;
diff --git a/refs.h b/refs.h
index 31f7bf9642..d4056f9fe2 100644
--- a/refs.h
+++ b/refs.h
@@ -569,6 +569,11 @@ enum action_on_err {
};
/*
+ * Skip executing the reference-transaction hook.
+ */
+#define REF_TRANSACTION_SKIP_HOOK (1 << 0)
+
+/*
* Begin a reference transaction. The reference transaction must
* be freed by calling ref_transaction_free().
*/