Skip to content

Commit 657ccca

Browse files
authored
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.
1 parent 3636e9e commit 657ccca

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/pi-extension/server/serverReview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const reviewRuntime: ReviewGitRuntime = {
126126
options?: { cwd?: string; timeoutMs?: number },
127127
): Promise<GitCommandResult> {
128128
return new Promise((resolve) => {
129-
const proc = spawn("git", args, {
129+
const proc = spawn("git", ["-c", "core.quotePath=false", ...args], {
130130
cwd: options?.cwd,
131131
stdio: ["ignore", "pipe", "pipe"],
132132
});

packages/server/git.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async function runGit(
3838
args: string[],
3939
options?: { cwd?: string; timeoutMs?: number },
4040
): Promise<GitCommandResult> {
41-
const proc = Bun.spawn(["git", ...args], {
41+
const proc = Bun.spawn(["git", "-c", "core.quotePath=false", ...args], {
4242
cwd: options?.cwd,
4343
stdout: "pipe",
4444
stderr: "pipe",

0 commit comments

Comments
 (0)