diff options
Diffstat (limited to 'refs.c')
| -rw-r--r-- | refs.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -1988,24 +1988,17 @@ int ref_update_reject_duplicates(struct string_list *refnames, return 0; } -static const char hook_not_found; -static const char *hook; - static int run_transaction_hook(struct ref_transaction *transaction, const char *state) { struct child_process proc = CHILD_PROCESS_INIT; struct strbuf buf = STRBUF_INIT; + const char *hook; int ret = 0, i; - if (hook == &hook_not_found) - return ret; + hook = find_hook("reference-transaction"); if (!hook) - hook = xstrdup_or_null(find_hook("reference-transaction")); - if (!hook) { - hook = &hook_not_found; return ret; - } argv_array_pushl(&proc.args, hook, state, NULL); proc.in = -1; |
