Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sections/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -885,3 +885,8 @@ tag or SHA) and will cache based on that. Using a branch name (or `HEAD`) for
the value of [`rev`](#repos-rev) is not supported and will only represent the state of
that mutable ref at the time of hook installation (and will *NOT* update
automatically).

## Detecting when `pre-commit` is running

You can check for the existence of the `PRE_COMMIT` environment variable within
a hook to determine if it's being run from `pre-commit`.
Loading