summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-11-04 19:07:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-11-04 19:07:46 (GMT)
commit2b647089bab2fd41cdf90f728d8860f71218ddab (patch)
tree7b39e91f7bec1409a45b73d1798b105a882d2185
parenta876f0b95c95d58436045454ea7c8b51c5f96c2e (diff)
parentfa21296b58e5b2c865a3974e5f03b65f4026c510 (diff)
downloadgit-2b647089bab2fd41cdf90f728d8860f71218ddab.zip
git-2b647089bab2fd41cdf90f728d8860f71218ddab.tar.gz
git-2b647089bab2fd41cdf90f728d8860f71218ddab.tar.bz2
Merge branch 'ar/no-verify-doc'
Doc update. * ar/no-verify-doc: Document positive variant of commit and merge option "--no-verify"
-rw-r--r--Documentation/git-commit.txt5
-rw-r--r--Documentation/merge-options.txt5
-rwxr-xr-xt/t7504-commit-msg-hook.sh8
3 files changed, 14 insertions, 4 deletions
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 95fec5f..6c60bf9 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -212,8 +212,9 @@ include::signoff-option.txt[]
each trailer would appear, and other details.
-n::
---no-verify::
- This option bypasses the pre-commit and commit-msg hooks.
+--[no-]verify::
+ By default, the pre-commit and commit-msg hooks are run.
+ When any of `--no-verify` or `-n` is given, these are bypassed.
See also linkgit:githooks[5].
--allow-empty::
diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt
index 61ec157..d8f7cd7 100644
--- a/Documentation/merge-options.txt
+++ b/Documentation/merge-options.txt
@@ -132,8 +132,9 @@ ifdef::git-pull[]
Only useful when merging.
endif::git-pull[]
---no-verify::
- This option bypasses the pre-merge and commit-msg hooks.
+--[no-]verify::
+ By default, the pre-merge and commit-msg hooks are run.
+ When `--no-verify` is given, these are bypassed.
See also linkgit:githooks[5].
ifdef::git-pull[]
Only useful when merging.
diff --git a/t/t7504-commit-msg-hook.sh b/t/t7504-commit-msg-hook.sh
index 4e75925..bba58f0 100755
--- a/t/t7504-commit-msg-hook.sh
+++ b/t/t7504-commit-msg-hook.sh
@@ -133,6 +133,14 @@ test_expect_success '--no-verify with failing hook' '
'
+test_expect_success '-n followed by --verify with failing hook' '
+
+ echo "even more" >> file &&
+ git add file &&
+ test_must_fail git commit -n --verify -m "even more"
+
+'
+
test_expect_success '--no-verify with failing hook (editor)' '
echo "more stuff" >> file &&