Repository navigation
Require confirmation for git show --output in terminal auto-approval - #329026
Merged
Anthony Kim (anthonykim1) merged 1 commit intoAug 4, 2026
Merged
Conversation
Share the existing Git auto-approval rules across workbench and Agent Host, and deny automatic approval when git show writes through --output. Co-authored-by: Copilot <[email protected]> Copilot-Session: bda42f98-e73f-417f-b7e6-03cff9e2f604
Contributor
There was a problem hiding this comment.
Pull request overview
Shares Git terminal auto-approval rules across the workbench and Agent Host, while adding confirmation for git show --output.
Changes:
- Extracts shared Git auto-approval rules.
- Adds
git show --outputdenial rules. - Adds workbench and Agent Host regression coverage.
Show a summary per file
| File | Description |
|---|---|
src/vs/platform/terminal/common/autoApprove/gitAutoApproveRules.ts |
Defines shared Git rules and the new denial. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts |
Uses the shared rules in workbench defaults. |
src/vs/platform/agentHost/node/commandAutoApprover.ts |
Uses the shared rules in Agent Host fallback defaults. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts |
Adds workbench regression cases. |
src/vs/platform/agentHost/test/node/commandAutoApprover.test.ts |
Adds Agent Host regression cases. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
Anthony Kim (anthonykim1)
marked this pull request as ready for review
August 4, 2026 19:34
Anthony Kim (anthonykim1)
enabled auto-merge (squash)
August 4, 2026 19:39
roblourens
approved these changes
Aug 4, 2026
Anthony Kim (anthonykim1)
deleted the
anthonykim1/confirm-git-show-output
branch
August 4, 2026 20:04
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Resolves: #329029
git showuses--output=<path>or--output <path>.git show,--format, and similarly named options auto-approved.git -C <path>andgit --no-pagerprefixes.Inspirations from:
git show --outputrule mirrors the existinggit log --outputconfirmation rule.-Cand--no-pagerGit rule behavior.DEFAULT_TERMINAL_AUTO_APPROVE_RULESGit block.git log --outputdeny test.