mirror of
https://github.com/git/git.git
synced 2026-01-10 10:13:33 +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
@@ -1774,7 +1774,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
|
||||
|
||||
/* If a hook exists, give it a chance to interrupt*/
|
||||
if (!ok_to_skip_pre_rebase &&
|
||||
run_hooks_l("pre-rebase", options.upstream_arg,
|
||||
run_hooks_l(the_repository, "pre-rebase", options.upstream_arg,
|
||||
argc ? argv[0] : NULL, NULL))
|
||||
die(_("The pre-rebase hook refused to rebase."));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user