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