mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +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
@@ -125,7 +125,7 @@ static void branch_info_release(struct branch_info *info)
|
||||
static int post_checkout_hook(struct commit *old_commit, struct commit *new_commit,
|
||||
int changed)
|
||||
{
|
||||
return run_hooks_l("post-checkout",
|
||||
return run_hooks_l(the_repository, "post-checkout",
|
||||
oid_to_hex(old_commit ? &old_commit->object.oid : null_oid()),
|
||||
oid_to_hex(new_commit ? &new_commit->object.oid : null_oid()),
|
||||
changed ? "1" : "0", NULL);
|
||||
|
||||
Reference in New Issue
Block a user