diff options
| author | Adrian Ratiu <adrian.ratiu@collabora.com> | 2026-03-25 21:54:55 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-25 14:00:46 -0700 |
| commit | 8f7db6f8b585a3eef4ba595efd2d098f9abf3606 (patch) | |
| tree | d2d4bec32e2a0aae66c898c532ced33343d34761 /hook.h | |
| parent | b06770e5d8948c7cad76d7507423376eacf1e005 (diff) | |
| download | git-8f7db6f8b585a3eef4ba595efd2d098f9abf3606.tar.xz | |
hook: rename cb_data_free/alloc -> hook_data_free/alloc
Rename the hook callback function types to use the hook prefix.
This is a style fix with no logic changes.
Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'hook.h')
| -rw-r--r-- | hook.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -43,8 +43,8 @@ struct hook { void *feed_pipe_cb_data; }; -typedef void (*cb_data_free_fn)(void *data); -typedef void *(*cb_data_alloc_fn)(void *init_ctx); +typedef void (*hook_data_free_fn)(void *data); +typedef void *(*hook_data_alloc_fn)(void *init_ctx); struct run_hooks_opt { /* Environment vars to be set for each hook */ @@ -131,14 +131,14 @@ struct run_hooks_opt { * * The `feed_pipe_ctx` pointer can be used to pass initialization data. */ - cb_data_alloc_fn feed_pipe_cb_data_alloc; + hook_data_alloc_fn feed_pipe_cb_data_alloc; /** * Called to free the memory initialized by `feed_pipe_cb_data_alloc`. * * Must always be provided when `feed_pipe_cb_data_alloc` is provided. */ - cb_data_free_fn feed_pipe_cb_data_free; + hook_data_free_fn feed_pipe_cb_data_free; }; #define RUN_HOOKS_OPT_INIT { \ @@ -188,7 +188,7 @@ struct string_list *list_hooks(struct repository *r, const char *hookname, * Frees the memory allocated for the hook list, including the `struct hook` * items and their internal state. */ -void hook_list_clear(struct string_list *hooks, cb_data_free_fn cb_data_free); +void hook_list_clear(struct string_list *hooks, hook_data_free_fn cb_data_free); /** * Frees the hook configuration cache stored in `struct repository`. |
