Skip to content

Pass --no-ext-diff in getBranchMergeBaseDiff and getCommitRangeDiff - #23214

Merged
sergiou87 merged 1 commit into
developmentfrom
sergiou87-no-ext-diff-history-compare
Nov 23, 2026
Merged

sergiou87 merged 1 commit into
developmentfrom
sergiou87-no-ext-diff-history-compare

Conversation

@sergiou87

@sergiou87 sergiou87 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Description

  • Pass --no-ext-diff to git diff in getBranchMergeBaseDiff and getCommitRangeDiff (app/src/lib/git/diff.ts) so that any configured diff.external tool is ignored when rendering commit-range and branch-comparison diffs.
  • Aligns both functions with getWorkingDirectoryDiff, getResolutionDiff, and getFilesDiffText, which already pass --no-ext-diff.
  • Adds unit tests in app/test/unit/git/diff-test.ts verifying both functions ignore diff.external and 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 in app/test/unit/git/push-test.ts and app/test/unit/git/rev-parse-test.ts).
  • Ad-hoc Playwright E2E run against unpackaged production build (out/main.js) with a local diff.external sentinel 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 invoking diff.external.
  • Manual testing

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.external tools

Ensure git diff invocations used for branch merge-base and commit-range diffs ignore any configured diff.external program, matching getWorkingDirectoryDiff, getResolutionDiff, and getFilesDiffText.
Copilot AI balanced review requested due to automatic review settings November 23, 2026 13:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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-diff to both diff functions, matching existing diff-handling behavior.
  • Adds regression tests verifying that diff.external is 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

@sergiou87
sergiou87 marked this pull request as ready for review November 23, 2026 13:30
@sergiou87
sergiou87 requested a review from a team as a code owner November 23, 2026 13:30
@sergiou87
sergiou87 requested a review from tidy-dev November 23, 2026 13:30
@sergiou87
sergiou87 merged commit 7abdff6 into development Nov 23, 2026
32 checks passed
@sergiou87
sergiou87 deleted the sergiou87-no-ext-diff-history-compare branch November 23, 2026 13:47
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.

4 participants