$ echo ' - id: destroyed-symlinks' >> .pre-commit-config.yaml
$ git add -p !$
git add -p .pre-commit-config.yaml
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bfde4717..949f3ffc 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -21,3 +21,4 @@ repos:
- id: check-vcs-permalinks
- id: check-xml
- id: debug-statements
+ - id: destroyed-symlinks
(1/1) Stage this hunk [y,n,q,a,d,e,?]? y
$ git commit -m 'new hook destroyed-symlinks'
[ERROR] `destroyed-symlinks` is not present in repository https://github.com/pre-commit/pre-commit-hooks. Typo? Perhaps it is introduced in a newer version? Often `pre-commit autoupdate` fixes this.
$ git status
On branch pre-commit
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: .pre-commit-config.yaml
Untracked files:
(use "git add <file>..." to include in what will be committed)
tests/__init__.py
$ pre-commit autoupdate
Updating https://github.com/pre-commit/pre-commit-hooks ... [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
Cannot update because the tip of HEAD is missing these hooks:
destroyed-symlinks
$ git checkout .
Updated 0 paths from the index
$ pre-commit autoupdate
Updating https://github.com/pre-commit/pre-commit-hooks ... Cannot update because the tip of HEAD is missing these hooks:
destroyed-symlinks
$ pre-commit --version
pre-commit 2.9.0
Hello 馃憢
I'm setting up
pre-commiton a project and came across an issue when adding hookdestroyed-symlinks. The error message suggested runningpre-commit autoupdate. I ran that and saw that it cannot update because the tip of HEAD is missing that hook. I'm not sure what that means so posting here.