From: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, james@jamesliu.io,
"brian m. carlson" <sandals@crustytoothpaste.net>,
Phillip Wood <phillip.wood123@gmail.com>,
"D. Ben Knoble" <ben.knoble@gmail.com>,
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>,
Derrick Stolee <stolee@gmail.com>,
Derrick Stolee <stolee@gmail.com>
Subject: [PATCH v2] docs: document core.hooksPath=/dev/null
Date: Wed, 16 Apr 2025 15:42:15 +0000 [thread overview]
Message-ID: <pull.1899.v2.git.1744818135435.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1899.git.1743719888430.gitgitgadget@gmail.com>
From: Derrick Stolee <stolee@gmail.com>
If a user wishes to disable hooks, then they can do so using the
established pattern of setting 'core.hooksPath' to /dev/null. This is
already tested in t1350-config-hooks-path.sh, but has not previously
been visible in the documentation.
Update the documentation to include this as an option.
Signed-off-by: Derrick Stolee <stolee@gmail.com>
---
docs: document core.hooksPath=/dev/null
Based on the discussion of the proposed --no-hooks option in v1, that
code change is dropped in favor of this documentation of
core.hooksPath=/dev/null.
Thanks,
* Stolee
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1899%2Fderrickstolee%2Fno-hooks-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1899/derrickstolee/no-hooks-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1899
Range-diff vs v1:
1: 91e82850e7d < -: ----------- git: add --no-hooks global option
-: ----------- > 1: a9cd4bd5100 docs: document core.hooksPath=/dev/null
Documentation/config/core.adoc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/config/core.adoc b/Documentation/config/core.adoc
index 8f6d8e77541..9fde1ab63a7 100644
--- a/Documentation/config/core.adoc
+++ b/Documentation/config/core.adoc
@@ -512,6 +512,11 @@ centrally configure your Git hooks instead of configuring them on a
per-repository basis, or as a more flexible and centralized
alternative to having an `init.templateDir` where you've changed
default hooks.
++
+You can also disable all hooks entirely by setting `core.hooksPath`
+to `/dev/null`. This is usually only advisable for expert users and
+on a per-command basis using configuration parameters of the form
+`git -c core.hooksPath=/dev/null ...`.
core.editor::
Commands such as `commit` and `tag` that let you edit
base-commit: 5b97a56fa0e7d580dc8865b73107407c9b3f0eff
--
gitgitgadget
next prev parent reply other threads:[~2025-04-16 15:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 22:38 [PATCH] git: add --no-hooks global option Derrick Stolee via GitGitGadget
2025-04-03 22:55 ` brian m. carlson
2025-04-04 0:40 ` Derrick Stolee
2025-04-04 14:15 ` Phillip Wood
2025-04-14 10:59 ` Derrick Stolee
2025-04-16 10:29 ` Phillip Wood
2025-04-16 14:28 ` Junio C Hamano
2025-04-16 15:30 ` Derrick Stolee
2025-04-14 15:25 ` Lucas Seiki Oshiro
2025-04-14 21:05 ` brian m. carlson
2025-04-11 18:53 ` D. Ben Knoble
2025-04-16 15:42 ` Derrick Stolee via GitGitGadget [this message]
2025-04-16 16:53 ` [PATCH v2] docs: document core.hooksPath=/dev/null Lucas Seiki Oshiro
2025-04-17 0:25 ` Derrick Stolee
2025-04-17 0:39 ` brian m. carlson
2025-04-17 3:42 ` Junio C Hamano
2025-04-17 16:02 ` Lucas Seiki Oshiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.1899.v2.git.1744818135435.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=james@jamesliu.io \
--cc=lucasseikioshiro@gmail.com \
--cc=phillip.wood123@gmail.com \
--cc=sandals@crustytoothpaste.net \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.