• Damien's avatar
    run-command: add hint when a hook is ignored · f805a00a
    Damien authored
    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's avatarDamien Marié <damien@dam.io>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
run-command.c 37 KB