fix(claude-permissions): deny git restore path discards like checkout - #351
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @kyle-sexton's task in 4m 53s —— View job Review: PR #351 — deny
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ebf74fdd20
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ebf74fd to
7dbd4a9
Compare
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
Mirror checkout discard coverage for git restore: add -- separator forms, bare-path catch-all, and PowerShell counterparts so `git restore <path>` is blocked the same way as `git checkout -- <path>`. Closes #334 Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
7dbd4a9 to
b818457
Compare
|
Addressed the Important reviews: dropped catch-all restore denies that blocked |
Drop catch-all `git restore *` rules that also blocked `--staged` unstage and over-broad PowerShell `git * restore *`. Document the bare-path gap as the same glob/precedence limit as --force-with-lease. Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
Summary
Closes the asymmetry where
git checkout -- <path>was denied butgit restore <path>was not.Adds mirror deny rules for both spellings of discarding uncommitted working-tree changes:
--separator forms:git restore -- *,git restore * -- *git restore *(restore has no branch/ref ambiguity)PowerShell(...)counterparts, includinggit * restoreprefixed formsExtends the component test to pin the new rules in CI. Bare
git checkout <path>without--is left unchanged — the glob grammar cannot distinguish a path from a branch name.Test plan
bash harness/shell/run-tests.sh components/claude-permissions/claude-permissions.test.sh— passjq empty components/claude-permissions/claude-permissions.json— valid JSONRelated
Closes #334