fix(claude-do): merge GitService stderr matches are English-only, same locale bug

ClaudeDo-Task: 66b7ad7b-ffc4-4ebd-8b21-54bba28e5b04
This commit is contained in:
mika kuns
2026-09-10 13:56:14 +02:00
2 changed files with 60 additions and 0 deletions
+5
View File
@@ -704,6 +704,11 @@ public sealed class GitService
// (mktree "input format error") and would prepend to stdin commit messages.
StandardInputEncoding = stdinData is not null ? new UTF8Encoding(false) : null,
};
// Force English stderr/stdout so the English-only substring matches below
// (e.g. "ambiguous argument 'HEAD'", "tell me who you are") work regardless
// of the OS locale git for Windows picks up.
psi.Environment["LC_ALL"] = "C";
psi.Environment["LANGUAGE"] = "C";
psi.ArgumentList.Add("-C");
psi.ArgumentList.Add(workDir);
foreach (var a in args) psi.ArgumentList.Add(a);