Skip to content

fix(git): pass --no-ext-diff to patch-emitting git diff calls#2352

Open
avshyz wants to merge 1 commit intopingdotgg:mainfrom
avshyz:fix/git-diff-no-ext-diff
Open

fix(git): pass --no-ext-diff to patch-emitting git diff calls#2352
avshyz wants to merge 1 commit intopingdotgg:mainfrom
avshyz:fix/git-diff-no-ext-diff

Conversation

@avshyz
Copy link
Copy Markdown

@avshyz avshyz commented Apr 26, 2026

Without --no-ext-diff, patches passed to parsePatchFiles (@pierre/diffs) honor the user's diff.external config — anyone with difftastic / delta set globally got "Unsupported diff format. Showing raw patch." in the diff panel.

Adds --no-ext-diff to the three call sites whose stdout is parsed:

  • CheckpointStore.diffCheckpoints
  • GitCore.prepareCommitContext.stagedPatch
  • GitCore.readRangeContext.diffPatch

Repro

git config --global diff.external difft

Make an edit → diff panel falls back to raw patch.

Patches consumed by parsePatchFiles (@pierre/diffs) honored the user's
diff.external config, so users with a structural differ set globally
(difftastic, delta-as-ext-diff, etc.) saw 'Unsupported diff format.
Showing raw patch.' in the diff panel.

Add --no-ext-diff to the three call sites whose stdout flows into
parsePatchFiles:
- CheckpointStore.diffCheckpoints
- GitCore.prepareCommitContext.stagedPatch
- GitCore.readRangeContext.diffPatch
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: feaf2ced-838a-4dd5-a316-009041f37fd8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 26, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 26, 2026

Approvability

Verdict: Approved

Straightforward defensive fix adding --no-ext-diff to git diff commands to ensure consistent patch output format regardless of user's external diff driver configuration. Minimal scope with no logic changes.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant