mirror of
https://github.com/j178/prek.git
synced 2026-04-25 02:11:36 +02:00
90046cee4f
## Summary `auto-update` now validates existing `# frozen:` comments against the commit pinned in `rev`. If the frozen comment is stale: - in normal update mode, `auto-update` updates it to a matching ref when possible, or removes it if no ref points to the pinned commit - in `--dry-run`, it only reports the mismatch and does not modify the config file - in `--check`, it behaves like `--dry-run` and exits with status 1 if updates would be made This keeps frozen comments consistent with pinned SHA revisions without adding a separate command. ## Example ```console ❯ cargo run -- auto-update --check warning: [https://github.com/crate-ci/typos] frozen ref `v1.0` does not match `1111111111111111111111111111111111111111` --> .pre-commit-config.yaml:18:63 | 18 | rev: '1111111111111111111111111111111111111111' # frozen: v1.0 | ^^^^ `v1.0` could not be resolved | = note: pinned commit `1111111111111111111111111111111111111111` does not exist in the repo ``` Closes #1864