Repository navigation
Pass --no-ext-diff in getBranchMergeBaseDiff and getCommitRangeDiff - #23214
Merged
Merged
Conversation
Ensure git diff invocations used for branch merge-base and commit-range diffs ignore any configured diff.external program, matching getWorkingDirectoryDiff, getResolutionDiff, and getFilesDiffText.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the change disabling external diff tools in commit-range and branch-comparison views.
No open issues 🎉
What changed in this PR
This PR ensures GitHub Desktop uses Git’s built-in diff output for commit-range and branch-comparison views, ignoring configured external diff tools.
Changes:
- Adds
--no-ext-diffto both diff functions, matching existing diff-handling behavior. - Adds regression tests verifying that
diff.externalis ignored and expected unified diff content is returned.
| File | Description |
|---|---|
app/test/unit/git/diff-test.ts |
Adds external-diff regression tests for both functions. |
app/src/lib/git/diff.ts |
Disables external diff tools for merge-base and commit-range diffs. |
Review effort: Balanced
tidy-dev
approved these changes
Nov 23, 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.
Description
--no-ext-difftogit diffingetBranchMergeBaseDiffandgetCommitRangeDiff(app/src/lib/git/diff.ts) so that any configureddiff.externaltool is ignored when rendering commit-range and branch-comparison diffs.getWorkingDirectoryDiff,getResolutionDiff, andgetFilesDiffText, which already pass--no-ext-diff.app/test/unit/git/diff-test.tsverifying both functions ignorediff.externaland still return expected unified diffs.Validation (commit
9bd479b8b3)npm test -- app/test/unit/git/diff-test.ts— passed (38/38; both new tests confirmed failing before the fix).npm run lint— passed.npm test— 3,579/3,585 passed (4 unrelated local-environment failures inapp/test/unit/git/push-test.tsandapp/test/unit/git/rev-parse-test.ts).out/main.js) with a localdiff.externalsentinel configured — passed; verified working directory, single-commit, commit-range (modified, renamed, added, deleted, whitespace-only with Hide Whitespace Changes, Split and Unified views), and branch-compare diffs all render cleanly without invokingdiff.external.Team-authored review
Evidence: See the Validation section above (covers commit
9bd479b8b3).Review path: Lightweight review
Release notes
Notes: [Fixed] Commit-range and branch-comparison diffs ignore configured
diff.externaltools