aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/hook.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-13 11:13:28 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-13 10:01:01 -0700
commit169c979771158ddc3310f7a1e0e141fd7d0ed088 (patch)
treee01728374589fb980fef51ede875399b275a9647 /builtin/hook.c
parent419dbb29d82b78bcaf0ff22ac7d5db7d1c327575 (diff)
downloadgit-169c979771158ddc3310f7a1e0e141fd7d0ed088.tar.gz
hooks: remove implicit dependency on `the_repository`
We implicitly depend on `the_repository` in our hook subsystem because we use `strbuf_git_path()` to compute hook paths. Remove this dependency by accepting a `struct repository` as parameter instead. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/hook.c')
-rw-r--r--builtin/hook.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/hook.c b/builtin/hook.c
index 5234693a94..cc37438fde 100644
--- a/builtin/hook.c
+++ b/builtin/hook.c
@@ -58,7 +58,7 @@ static int run(int argc, const char **argv, const char *prefix)
hook_name = argv[0];
if (!ignore_missing)
opt.error_if_missing = 1;
- ret = run_hooks_opt(hook_name, &opt);
+ ret = run_hooks_opt(the_repository, hook_name, &opt);
if (ret < 0) /* error() return */
ret = 1;
return ret;