fix(git): disable external diff for review diff previews (#4854)

This commit is contained in:
ohbentos authored and GitHub committed 2026-07-29 16:27:00 +00:00
1 parent faea70aeba
commit 85a8986870
1 file changed
+18 -1
+18 -1
View File
@@ -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`,