fix(source-control): preserve UTF-8 paths in status and branch diff (#1515)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Brennan Benson
2026-05-06 16:22:24 -07:00
committed by GitHub
co-authored by Orca
parent a75e706a6c
commit e7fef4e14d
6 changed files with 188 additions and 8 deletions
+3 -1
View File
@@ -190,8 +190,10 @@ export class GitHandler {
}
const gitBound = this.git.bind(this)
return branchCompareOp(gitBound, worktreePath, baseRef, async (mergeBase, headOid) => {
// Why: -c core.quotePath=false keeps non-ASCII filenames as raw UTF-8;
// without it parseBranchDiff would yield C-style octal-escaped paths.
const { stdout } = await gitBound(
['diff', '--name-status', '-M', '-C', mergeBase, headOid],
['-c', 'core.quotePath=false', 'diff', '--name-status', '-M', '-C', mergeBase, headOid],
worktreePath
)
return parseBranchDiff(stdout)