diff --git a/README.md b/README.md index 69d4aa1..ca13b2a 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ and vendored drift cannot happen: repos: - repo: https://github.com/offworldlabs/ops - rev: dead-code-v1 + rev: dead-code-v1.0 hooks: - id: dead-code @@ -32,7 +32,11 @@ and vendored drift cannot happen: | --- | --- | --- | | `dead-code` | [`check-dead-code.sh`](check-dead-code.sh) | `vulture==2.14` on `PATH` | -Hook versions are published as tags named `-v`. To change a hook: edit +Hook versions are published as tags named `-v.`. **The dot is +required, not cosmetic.** pre-commit warns "appears to be a mutable reference" +for any `rev` containing neither a `.` nor pure hex, so a tag like +`dead-code-v1` makes every consumer print a spurious warning on every run +(`clientlib.py`, `WarnMutableRev`). To change a hook: edit it here, run `bash tests/test-check-dead-code.sh`, merge, tag, then bump `rev` in the consumers (`pre-commit autoupdate` does the bump for you). diff --git a/check-dead-code.sh b/check-dead-code.sh index 5f49b17..a8d604d 100755 --- a/check-dead-code.sh +++ b/check-dead-code.sh @@ -5,11 +5,12 @@ # Consumed by other repos as a pre-commit hook, pinned by rev: # # - repo: https://github.com/offworldlabs/ops -# rev: dead-code-v1 +# rev: dead-code-v1.0 # hooks: # - id: dead-code # -# Do not vendor this file. Change it here, publish a dead-code-v tag, then +# Do not vendor this file. Change it here, publish a dead-code-v. +# tag (the dot matters — pre-commit warns "mutable reference" without one), then # bump rev in the consumers (`pre-commit autoupdate` does that for you). # # check-dead-code.sh # fail if anything unwhitelisted is dead