Skip to content

fix(permissions-git-safe): add bare git status/diff and git ls-tree#11

Merged
trick77 merged 2 commits intomasterfrom
fix/permissions-git-safe-bare-and-ls-tree
May 6, 2026
Merged

fix(permissions-git-safe): add bare git status/diff and git ls-tree#11
trick77 merged 2 commits intomasterfrom
fix/permissions-git-safe-bare-and-ls-tree

Conversation

@trick77
Copy link
Copy Markdown
Owner

@trick77 trick77 commented May 6, 2026

Summary

  • Add bare "git status" and "git diff" entries alongside the existing wildcarded ones, so git status --short and git diff --cached --stat no longer prompt on opencode versions / configs that still hit the wildcard-vs-flags edge case (sst/opencode#6676).
  • Add "git ls-tree *" — was missing entirely.
  • Bump permissions-git-safe to v0.1.2.

Test plan

  • npm test — 43/43 pass
  • Reinstall preset locally: opencode-presets install permissions-git-safe
  • Confirm git status --short, git diff --cached --stat, git ls-tree --name-only HEAD <path> no longer prompt

trick77 added 2 commits May 4, 2026 20:45
Some opencode setups still prompt for `git status --short` and
`git diff --cached --stat` even though `"git status *"` /
`"git diff *"` are present (issue #6676 was fixed in v1.1.18 but
older versions and edge-case configs still hit it). Mirror the
defensive pattern of pairing a bare entry with the wildcarded one.
Also add `git ls-tree *`, which was missing entirely.
@trick77 trick77 merged commit 55b3479 into master May 6, 2026
2 checks passed
@trick77 trick77 deleted the fix/permissions-git-safe-bare-and-ls-tree branch May 6, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant