fix(scripts): git-ext PowerShell emits the '# To persist' SPECIFY_FEATURE hint (parity)#3632
Merged
mnriem merged 2 commits intoJul 22, 2026
Merged
Conversation
…TURE hint (parity) The Git extension's create-new-feature-branch.ps1 printed a non-JSON hint 'SPECIFY_FEATURE environment variable set to: <name>', diverging from every twin: the bash (create-new-feature-branch.sh) and python (create_new_feature_branch.py) siblings of the same extension, and the core create-new-feature.ps1, all emit '# To persist in your shell: $env:SPECIFY_FEATURE = '<name>''. The old wording is also misleading — $env:SPECIFY_FEATURE is set only in this child process and never reaches the agent's shell, so the actionable output is the persist hint. Mirror the core PS twin's $featureAssignment construction and message. Test (pwsh CI): the non-JSON output uses the '# To persist in your shell:' form (fails before: old wording). Verified end-to-end via powershell.exe. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns the git extension’s PowerShell persistence hint with its sibling implementations.
Changes:
- Emits an actionable
$env:SPECIFY_FEATUREassignment. - Adds PowerShell regression coverage.
Show a summary per file
| File | Description |
|---|---|
extensions/git/scripts/powershell/create-new-feature-branch.ps1 |
Generates and prints the persistent environment assignment. |
tests/extensions/git/test_git_extension.py |
Verifies the corrected hint and removal of old wording. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Medium
mnriem
requested changes
Jul 22, 2026
mnriem
left a comment
Collaborator
There was a problem hiding this comment.
Please address Copilot feedback. If not applicable, please explain why
Address review: the docstring rendered the documented output form as '<name>'' (two trailing apostrophes) instead of '<name>'. Docstring-only; the assertions were already correct. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Fixed in 9d2fbd4: removed the doubled trailing apostrophe in the test docstring so the documented form reads |
mnriem
self-requested a review
July 22, 2026 13:59
mnriem
approved these changes
Jul 22, 2026
Collaborator
|
Thank you! |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
The Git extension's
create-new-feature-branch.ps1prints a non-JSON hint that diverges from every twin:Its bash twin (
create-new-feature-branch.sh), its python twin (create_new_feature_branch.py), and the corecreate-new-feature.ps1all emit:The old wording is also misleading:
$env:SPECIFY_FEATUREis set only in this child process and never propagates to the agent's shell, so the actionable output is precisely the persist hint the siblings print.Fix
Mirror the core PowerShell twin: build
$featureAssignment = '$env:SPECIFY_FEATURE = ' + $quotedBranchName(single-quoted,'-escaped) and change the output line to# To persist in your shell: $featureAssignment.BRANCH_NAME/FEATURE_NUMlines are untouched.Test
test_persist_hint_matches_twins(pwsh CI): the non-JSON output uses# To persist in your shell: $env:SPECIFY_FEATURE = '001-persist'— fails before (old wording). Verified end-to-end viapowershell.exe:Merge precedent for this exact bash-parity vein on these files: #3195, #3129/#3130.
🤖 Written with the assistance of Claude Code (AI). Bug self-found; fix/tests verified locally (fail-before / pass-after), ruff & ASCII-only checks clean.