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

Re: [PATCH v2] docs: document core.hooksPath=/dev/null

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 17, 2025, 00:39 UTC
Message-ID
<aABNzj66xq5HA6gA@tapette.crustytoothpaste.net>
In-Reply-To
<9e14443c-e549-46e1-9fbf-ee72800e6944@gmail.com>
On 2025-04-17 at 00:25:28, Derrick Stolee wrote:
Show 12 quoted lines
> On 4/16/2025 12:53 PM, Lucas Seiki Oshiro wrote:
> > Hi!
> > 
> >> +You can also disable all hooks entirely by setting `core.hooksPath`
> >> +to `/dev/null`.
> > 
> > Personally I think it would be better to focus on the non-expert user,
> 
> I absolutely want this to be targeted for expert users, so users self-
> select themselves into the risk of what happens when disabling hooks.
> This is a "there be dragons here" kind of warning, implying that you
> better know what you're doing if you are messing with hook paths.

Yes, I think that's the right choice. As we've established elsewhere, it's easy to break things or cause data loss (e.g., by not pushing Git LFS objects) by disabling hooks and the user should be confident of what they're doing before doing so.

That being said, I agree that in the general case we should make our documentation accessible to non-expert users because nobody is born knowing how to use Git and that will benefit the most people. This just happens to be an exception.

I thought the text in the patch looked good to me. I appreciate you graciously pivoting approaches and documenting this, both for the benefit of users and as an approach to help make sure we don't break this functionality.

-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Previous: Derrick StoleeNext: Junio C Hamano
Message 15 of 17 in “git: add --no-hooks global option”
  1. git: add --no-hooks global optionDerrick Stolee via GitGitGadget, Apr 3, 2025
  2. brian m. carlsonApr 3, 2025
  3. Derrick StoleeApr 4, 2025
  4. Phillip WoodApr 4, 2025
  5. Derrick StoleeApr 14, 2025
  6. Phillip WoodApr 16, 2025
  7. Junio C HamanoApr 16, 2025
  8. Derrick StoleeApr 16, 2025
  9. Lucas Seiki OshiroApr 14, 2025
  10. brian m. carlsonApr 14, 2025
  11. D. Ben KnobleApr 11, 2025
  12. docs: document core.hooksPath=/dev/nullDerrick Stolee via GitGitGadget, Apr 16, 2025
  13. Lucas Seiki OshiroApr 16, 2025
  14. Derrick StoleeApr 17, 2025
  15. brian m. carlsonApr 17, 2025
  16. Junio C HamanoApr 17, 2025
  17. Lucas Seiki OshiroApr 17, 2025

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.