Name hook tags with a dot so pre-commit stops warning - #2
Merged
Merged
Conversation
pre-commit warns "appears to be a mutable reference (moving tag / branch)" for any rev containing neither a "." nor pure hex — see WarnMutableRev in clientlib.py. It is a naming heuristic, not a real mutability check, but `rev: dead-code-v1` would have printed that warning on every run in all six consumer repos, and told developers the pin is unsupported. Tag is now dead-code-v1.0, verified silent. Documents the constraint in both the README and the script header so the next version does not regress it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ZcazeseXVpu8XrYA2tE1V
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1, before any consumer pins the tag.
Consuming
rev: dead-code-v1makes pre-commit print, on every run in every consumer repo:The tag is annotated and immutable, so the warning is wrong — but it is not a real mutability check. It is a naming heuristic in
clientlib.py:A rev is accepted quietly only if it contains a
.or is pure hex.dead-code-v1is neither. That is also whyrev: v5.0.0andrev: v0.8.0in our existing scaffold never warn.Left alone this would have been noise on six repos' CI logs and local commits, and it actively misinforms — a developer reading "not supported" may well go and change the pin.
Retagged as
dead-code-v1.0, verified to run silently. This PR updates the two places that advertise the old name and documents the constraint so the next version does not regress it.dead-code-v1still exists and points at the same commit; deleting it needs a separate call since nothing consumes it yet.🤖 Generated with Claude Code
https://claude.ai/code/session_013ZcazeseXVpu8XrYA2tE1V