Repository navigation
Update Git checkout and SSH host handling - #23239
Merged
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The GitHub SSH host-trust change lacks focused validation, requiring human review of foreground acceptance/rejection and background no-prompt behavior.
No open issues 🎉
What changed in this PR
This PR updates GitHub Desktop’s Git integration to handle option-like branch names safely and use the existing SSH host-authenticity flow consistently.
Changes:
- Adds explicit checkout option boundaries and documents their placement.
- Adds regression tests for local branch names and remote tracking, with and without progress callbacks.
- Removes automatic acceptance of the pinned GitHub RSA host key.
| File | Description |
|---|---|
docs/contributing/styleguide.md |
Clarifies checkout option and path separator placement. |
app/test/unit/git/checkout-test.ts |
Tests option-like local branch names and remote checkout tracking. |
app/src/lib/trampoline/trampoline-askpass-handler.ts |
Removes the GitHub-specific host-key auto-accept exception. |
app/src/lib/git/checkout.ts |
Places --end-of-options before branch targets while preserving checkout options. |
Review effort: Balanced
sergiou87
previously approved these changes
Nov 26, 2026
Co-authored-by: Copilot App <[email protected]>
sergiou87
approved these changes
Nov 26, 2026
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.
N/A
Description
Updates checkout argument boundaries and routes SSH host authenticity checks through the existing prompt flow. Adds checkout regression tests and updates the Git argument guidance.
Validation:
npm test -- app/test/unit/git/checkout-test.ts- passed (17 tests).npx tsc --noEmit -p .- passed.npm run lint:fix- passed; no files changed.The tests and type check ran on the same file tree as commit
296fc3856f, before its history was replaced. No focused SSH host-authenticity test was run.Screenshots
N/A: no visual UI changes.
Release notes
Notes: Improved Git checkout and SSH host handling.
Team-authored review
Evidence: Validation results above; screenshots are not applicable.
Review path:
needs-deep-review. Git checkout arguments and SSH host trust need in-depth review by another human, including checkout behavior and the host verification prompt.