git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Inaccurate documentation for core.hooksPath?

From
MQMark Boyd - Q2AAAA <mark.boyd@gsa.gov>
Date
May 23, 2024, 19:36 UTC
Message-ID
<CABBKgan9hLme+9WTNNVrZXxqO4-VRGiC3RLQgfKFUHAy3QZvDA@mail.gmail.com>
Hello,

This documentation says that git only looks for hooks in the configured core.hooksPath: https://github.com/git/git/blob/master/Documentation/config/core.txt#L499-L504

However, in my testing, git will run both hooks located in the core.hooksPath directory and in the local git repo hooks directory (.git/hooks by default). Observation of this behavior is documented in https://github.com/cloud-gov/caulking/issues/37.

Is the behavior I'm seeing the actually expected behavior of git? Or are we somehow relying on an edge-case or buggy behavior?

Thanks, Mark

Next: Jeff King
Message 1 of 2 in “Inaccurate documentation for core.hooksPath?”
  1. Mark Boyd - Q2AAAAMay 23, 2024
  2. Jeff KingMay 29, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.