Merge branch 'ab/config-based-hooks-1'
Mostly preliminary clean-up in the hook API.
* ab/config-based-hooks-1:
hook-list.h: add a generated list of hooks, like config-list.h
hook.c users: use "hook_exists()" instead of "find_hook()"
hook.c: add a hook_exists() wrapper and use it in bugreport.c
hook.[ch]: move find_hook() from run-command.c to hook.c
Makefile: remove an out-of-date comment
Makefile: don't perform "mv $@+ $@" dance for $(GENERATED_H)
Makefile: stop hardcoding {command,config}-list.h
Makefile: mark "check" target as .PHONY
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#include "sequencer.h"
|
||||
#include "tag.h"
|
||||
#include "run-command.h"
|
||||
#include "hook.h"
|
||||
#include "exec-cmd.h"
|
||||
#include "utf8.h"
|
||||
#include "cache-tree.h"
|
||||
@ -1459,7 +1460,7 @@ static int try_to_commit(struct repository *r,
|
||||
}
|
||||
}
|
||||
|
||||
if (find_hook("prepare-commit-msg")) {
|
||||
if (hook_exists("prepare-commit-msg")) {
|
||||
res = run_prepare_commit_msg_hook(r, msg, hook_commit);
|
||||
if (res)
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user