Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien MariƩ <damien@dam.io>2017-10-06 11:07:55 +0300
committerJunio C Hamano <gitster@pobox.com>2017-10-10 07:21:46 +0300
commitf805a00a396ee91599902cebe55620b2a4c813b9 (patch)
treeff5e8a8d4b5dabf8a80a7442fe8672d6e61822c3 /advice.h
parent217f2767cbcb562872437eed4dec62e00846d90c (diff)
run-command: add hint when a hook is ignored
When an hook is present but the file is not set as executable then git will ignore the hook. For now this is silent which can be confusing. This commit adds this warning to improve the situation: hint: The 'pre-commit' hook was ignored because it's not set as executable. hint: You can disable this warning with `git config advice.ignoredHook false` To allow the old use-case of enabling/disabling hooks via the executable flag a new setting is introduced: advice.ignoredHook. Signed-off-by: Damien MariƩ <damien@dam.io> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.h')
-rw-r--r--advice.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/advice.h b/advice.h
index c84a44531c..f525d6f89c 100644
--- a/advice.h
+++ b/advice.h
@@ -19,6 +19,7 @@ extern int advice_set_upstream_failure;
extern int advice_object_name_warning;
extern int advice_rm_hints;
extern int advice_add_embedded_repo;
+extern int advice_ignored_hook;
int git_default_advice_config(const char *var, const char *value);
__attribute__((format (printf, 1, 2)))