File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -212,8 +212,9 @@ include::signoff-option.txt[]
212
212
each trailer would appear, and other details.
213
213
214
214
-n::
215
- --no-verify::
216
- This option bypasses the pre-commit and commit-msg hooks.
215
+ --[no-]verify::
216
+ By default, the pre-commit and commit-msg hooks are run.
217
+ When any of `--no-verify` or `-n` is given, these are bypassed.
217
218
See also linkgit:githooks[5].
218
219
219
220
--allow-empty::
Original file line number Diff line number Diff line change @@ -132,8 +132,9 @@ ifdef::git-pull[]
132
132
Only useful when merging.
133
133
endif::git-pull[]
134
134
135
- --no-verify::
136
- This option bypasses the pre-merge and commit-msg hooks.
135
+ --[no-]verify::
136
+ By default, the pre-merge and commit-msg hooks are run.
137
+ When `--no-verify` is given, these are bypassed.
137
138
See also linkgit:githooks[5].
138
139
ifdef::git-pull[]
139
140
Only useful when merging.
Original file line number Diff line number Diff line change @@ -133,6 +133,14 @@ test_expect_success '--no-verify with failing hook' '
133
133
134
134
'
135
135
136
+ test_expect_success ' -n followed by --verify with failing hook' '
137
+
138
+ echo "even more" >> file &&
139
+ git add file &&
140
+ test_must_fail git commit -n --verify -m "even more"
141
+
142
+ '
143
+
136
144
test_expect_success ' --no-verify with failing hook (editor)' '
137
145
138
146
echo "more stuff" >> file &&
You can’t perform that action at this time.
0 commit comments