fix(git): pin git's locale for clone, so failures classify on any host

classifyGitFailure() matches git's English stderr, but cloneRepository()
spawned git with gitNonInteractiveEnv(), which left the host's locale in
place. Under de_DE.UTF-8 a missing ref came back as FAILED / 422 instead of
REF_NOT_FOUND / 400, and a missing repository as 422 instead of 404; the
clone dialog showed "git failed: Schwerwiegend: …". gitNonInteractiveEnv()
now sets LC_ALL=C and LANG=C, as git-workspace-status.ts already does.

Two tests depended on the locale on their own:
- git-status-routes: the spy runner called git without the production
  runner's LC_ALL=C, so "Kein Git-Repository" was not recognised.
- custom-model-run-menu-ui: the modal formats with toLocaleString(), the
  test hard-coded 16,384 and 40,000.

Full suite under de_DE.UTF-8: 5 failed before, 0 after.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Randalix
2026-10-09 17:48:28 +02:00
committed by Codeman maintainer
co-authored by Claude Opus 5.5
parent 3a0cee6b90
commit 6ba311f38d
3 changed files with 8 additions and 2 deletions
+2
View File
@@ -14,6 +14,8 @@ import { clearGitStatusCache, runGit, type GitRunner } from '../../src/git-works
const ENV = {
...process.env,
// As the production runner (git-workspace-status.ts): git's not-a-repo message is matched in English.
LC_ALL: 'C',
GIT_AUTHOR_NAME: 'T',
GIT_AUTHOR_EMAIL: 't@example.com',
GIT_COMMITTER_NAME: 'T',