| 2647 | } |
| 2648 | |
| 2649 | static int run_transaction_hook(struct ref_transaction *transaction, |
| 2650 | const char *state) |
| 2651 | { |
| 2652 | struct run_hooks_opt opt = RUN_HOOKS_OPT_INIT; |
| 2653 | int ret = 0; |
| 2654 | |
| 2655 | strvec_push(&opt.args, state); |
| 2656 | |
| 2657 | opt.feed_pipe = transaction_hook_feed_stdin; |
| 2658 | opt.feed_pipe_ctx = transaction; |
| 2659 | opt.feed_pipe_cb_data_alloc = transaction_feed_cb_data_alloc; |
| 2660 | opt.feed_pipe_cb_data_free = transaction_feed_cb_data_free; |
| 2661 | |
| 2662 | ret = run_hooks_opt(transaction->ref_store->repo, "reference-transaction", &opt); |
| 2663 | |
| 2664 | return ret; |
| 2665 | } |
| 2666 | |
| 2667 | int ref_transaction_prepare(struct ref_transaction *transaction, |
| 2668 | struct strbuf *err) |
no test coverage detected