Repository navigation
Say the Pre-Commit Framework Sets Unstaged Changes Aside - #2922
Conversation
The write-safety law now tells a task to leave the shared git stash list alone. Two lines still said the pre-commit framework "stashes" unstaged changes, which beside that rule can read as the hook writing to refs/stash. The framework saves unstaged changes as a patch file in its own cache directory and reapplies it, so both lines now say it sets them aside. Fixes #2912 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟢 Approval recommended
Documentation-only changes were fully reviewed with no unresolved issues.
0 open findings
What changed in this PR
Clarifies that pre-commit sets unstaged changes aside without using Git’s shared stash.
Changes:
- Updated the governance hook description.
- Updated the pre-commit snippet documentation.
| File | Description |
|---|---|
GOVERNANCE.md |
Clarifies pre-commit behavior. |
catalog/snippets/pre-commit/README.md |
Aligns snippet documentation. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2922 +/- ##
========================================
Coverage 60.00% 60.00%
========================================
Files 17 17
Lines 8773 8773
========================================
Hits 5264 5264
Misses 3509 3509
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ncurrency Exception to Main (#2924) - #2922 says the `pre-commit` framework sets unstaged changes aside, in GOVERNANCE.md and the pre-commit snippet README, rather than "stashes", which collided with the shared-stash rule - #2923 lets a hub-only file cite a hub `docs/` section by path while a carried file cites only instruction-set sections, drops hub-doc citations from the carried workflow snippets, adds Concurrency exception (5) for the codegen snippet's fixed-branch group, and cuts the validate action's restatement of "Verification Discipline" to a citation Closes #2912 Closes #2916 Closes #2917 Closes #2915 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Fixes #2912
Two lines described the
pre-commitframework as one that "stashes" unstaged changes, which reads as a write to the sharedgit stashlist beside the write-safety rule. Both now say the runner sets unstaged changes aside.Source evidence,
pre_commit/staged_files_only.pyin the upstream pre-commit repository:_unstaged_changes_cleared(patch_dir)writes the unstaged diff to apatch<time>-<pid>file underpatch_dir(the framework's own cache directory) and reapplies it afterwards with_git_apply.staged_files_only(patch_dir)wraps the hook run in that context manager.git stashand never touchesrefs/stash. Only its log message uses the word "Stashing".Gates run locally: build_dist --check, repo_gate, prose_lint (default whole-tree set and diff-scoped), spec/validate, docker_lint. The opt-in sentence-length and sentence-split checks flag only sentences that were already on the two touched lines.
🤖 Generated with Claude Code