mirror of
https://github.com/git/git.git
synced 2026-01-10 01:56:42 +00:00
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
@@ -1271,7 +1271,7 @@ static int run_pre_push_hook(struct transport *transport,
|
||||
struct ref *r;
|
||||
struct child_process proc = CHILD_PROCESS_INIT;
|
||||
struct strbuf buf;
|
||||
const char *hook_path = find_hook("pre-push");
|
||||
const char *hook_path = find_hook(the_repository, "pre-push");
|
||||
|
||||
if (!hook_path)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user