fix(server): stabilize non-repository Git diagnostics#4075
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
738d87c to
a070833
Compare
|
Superseded by #4077, which uses the replacement |
What Changed
LC_ALL=Conly for the two Git commands whose non-repository control flow parses an English diagnostic.Why
T3 Code identifies a non-repository result by matching Git's English diagnostic text. Git localizes that diagnostic through gettext, while the subprocess previously inherited the host locale. On systems with Git translations installed, a normal non-repository status could therefore be misclassified as a
GitCommandError.Using the C locale at these two call sites makes the parsed diagnostic deterministic without changing locale behavior for unrelated Git operations.
LC_ALLis scoped to the commands instead of using onlyLC_MESSAGESso the fix also works when the host already definesLC_ALL, which takes precedence over individual locale categories.Validation
vp checkvp run typecheckvp test apps/server/src/vcs/GitVcsDriverCore.test.tsChecklist