Skip to content

Commit 0cacfe3

Browse files
committed
Updated multiple-invocations comment
1 parent 89f275f commit 0cacfe3

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ Currently, directory-based hooks DO NOT accept user-args.
104104
- ``*-pkg-*`` : Hook runs using `'$(go list)/$(dirname $FILE)` as target.
105105

106106
#### Multiple Hook Invocations
107-
By design, the directory-based hooks only execute against a given directory once per hook invocation. HOWEVER, due to OS command-line length limits, Pre-Commit can invoke a hook multiple times if a large number of files are staged.
107+
By design, the directory-based hooks only execute against a given directory once per hook invocation.
108+
109+
HOWEVER, due to OS command-line length limits, Pre-Commit can invoke a hook multiple times if a large number of files are staged.
108110

109111
--------------------
110112
### Repo-Based Hooks

sample-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ repos:
3030
# Currently, directory-based hooks DO NOT accept user-args.
3131
#
3232
# Directory-Hook Suffixes:
33-
# *-dir-* : Hook runs with './$(dirname $FILE)' as target.
34-
# *-pkg-* : Hook runs with ''$(go list)/$(dirname $FILE)' as target.
33+
# *-dir-* : Hook runs using './$(dirname $FILE)' as target.
34+
# *-pkg-* : Hook runs using ''$(go list)/$(dirname $FILE)' as target.
3535
#
36-
# ! Multiple Hook Invocations by Pre-Commit
36+
# ! Multiple Hook Invocations
3737
# ! By design, the directory-based hooks only execute against a given
38-
# ! directory once per hook invocation. HOWEVER, pre-commit can invoke a
39-
# ! hook multiple times if a large number of files are staged
40-
# ! (due to OS command-line length limits).
38+
# ! directory once per hook invocation.
39+
# ! HOWEVER, due to OS command-line length limits, Pre-Commit can invoke
40+
# ! a hook multiple times if a large number of files are staged.
4141
#
4242
# Repo-Based Hooks:
4343
# Hooks named '*-repo-*' only run once (if any matching files are staged).

0 commit comments

Comments
 (0)