From 85a89868703530e03c5e79797c7b952c684bd222 Mon Sep 17 00:00:00 2001 From: ohbentos <72638975+ohbentos@users.noreply.github.com> Date: Wed, 29 Jul 2026 13:27:00 -0300 Subject: [PATCH] fix(git): disable external diff for review diff previews (#4854) --- apps/server/src/vcs/GitVcsDriverCore.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/apps/server/src/vcs/GitVcsDriverCore.ts b/apps/server/src/vcs/GitVcsDriverCore.ts index 73d9b6b0147a32f495d80faf40df9d6298382af8..3aa7575d5909be9d70077635fcd15fac43d610db 100644 --- a/apps/server/src/vcs/GitVcsDriverCore.ts +++ b/apps/server/src/vcs/GitVcsDriverCore.ts @@ -2049,7 +2049,18 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* executeGit( "GitVcsDriver.readUntrackedReviewDiffs.diff", cwd, - ["diff", "--no-index", "--patch", "--minimal", "--", "/dev/null", relativePath], + [ + "diff", + "--no-index", + "--patch", + "--no-color", + "--no-ext-diff", + "--no-textconv", + "--minimal", + "--", + "/dev/null", + relativePath, + ], { allowNonZeroExit: true, maxOutputBytes: REVIEW_UNTRACKED_DIFF_MAX_OUTPUT_BYTES, @@ -2094,6 +2105,9 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* [ "diff", "--patch", + "--no-color", + "--no-ext-diff", + "--no-textconv", "--minimal", ...(input.ignoreWhitespace ? ["--ignore-all-space"] : []), "HEAD", @@ -2127,6 +2141,9 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* [ "diff", "--patch", + "--no-color", + "--no-ext-diff", + "--no-textconv", "--minimal", ...(input.ignoreWhitespace ? ["--ignore-all-space"] : []), `${baseRef}...HEAD`, -- 2.54.0