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>
This commit is contained in:

committed by
Junio C Hamano

parent
419dbb29d8
commit
169c979771
@ -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;
|
||||
|
Reference in New Issue
Block a user