Repository navigation
fix(lookup): a pre-commit rev naming a branch is left alone, not an error - #253
Merged
Merged
Conversation
A rev naming a branch is not a commit hash, a tag or a GitHub Actions ref, so it reached "cannot classify current value" as an evaluation error. pre-commit accepts any git ref; like a GitHub Actions branch ref, a non-version rev now has no lookup and no error.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | d46f71b | Commit Preview URL Branch Preview URL |
Nov 11 2026, 07:10 AM |
Merged
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.
Bug 5 from design consult 4.
pre-commit allows any git ref as
rev. Tags and SHAs are recommended; a branch works but is mutable.precommit.rsskips commit hashes, but arev: mainreached lookup and failed with "cannot classify current value".pre-commit now joins the rule that looks a ref up only when it is a version (
needs_lookup,crates/lookup/src/lib.rs), and the opaque-ref return inevaluate_with. A non-versionrevgets no catalog fetch, no error and no update, the same treatment GitHub Actions branch refs get. Version tags are looked up as before.Test:
pinned_precommit_branch_rev_is_an_errorbecomesa_precommit_branch_rev_is_an_opaque_ref. Forrev: mainit asserts no lookup,Okand no updates; forrev: v4.5.0it asserts a lookup.Corpus snapshot: unchanged. Every pre-commit
revin the corpus is a version tag.Docs: the pre-commit paragraph in
guide/managers.md. The new behaviour matches what a Renovate user expects, so no departure entry is needed.