From 657cccaee019e96b3651dd7e7bf1133820d24f9b Mon Sep 17 00:00:00 2001 From: Michael Ramos Date: Thu, 30 Apr 2026 13:01:27 -0700 Subject: [PATCH] fix(review): support non-ASCII and whitespace file paths in code review (#637) Pass `-c core.quotePath=false` to all git invocations so paths with non-ASCII characters (Korean, Chinese, accented, etc.) and whitespace are output as raw UTF-8 instead of octal escapes. Fixes the 0/0 files issue when repos contain such paths. Closes #628 For provenance purposes, this commit was AI assisted. --- apps/pi-extension/server/serverReview.ts | 2 +- packages/server/git.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/pi-extension/server/serverReview.ts b/apps/pi-extension/server/serverReview.ts index 0a71009..68944b3 100644 --- a/apps/pi-extension/server/serverReview.ts +++ b/apps/pi-extension/server/serverReview.ts @@ -126,7 +126,7 @@ export const reviewRuntime: ReviewGitRuntime = { options?: { cwd?: string; timeoutMs?: number }, ): Promise { return new Promise((resolve) => { - const proc = spawn("git", args, { + const proc = spawn("git", ["-c", "core.quotePath=false", ...args], { cwd: options?.cwd, stdio: ["ignore", "pipe", "pipe"], }); diff --git a/packages/server/git.ts b/packages/server/git.ts index 3ceacc4..d6ccbc2 100644 --- a/packages/server/git.ts +++ b/packages/server/git.ts @@ -38,7 +38,7 @@ async function runGit( args: string[], options?: { cwd?: string; timeoutMs?: number }, ): Promise { - const proc = Bun.spawn(["git", ...args], { + const proc = Bun.spawn(["git", "-c", "core.quotePath=false", ...args], { cwd: options?.cwd, stdout: "pipe", stderr: "pipe", -- knotmirror 0.0.1