Repository navigation
Force the C locale for GVFS Git subprocesses - #2178
Merged
Merged
Conversation
Set LC_ALL=C in a shared Git subprocess factory so translated diagnostics do not bypass English error classifiers. Use the factory for GitProcess and standalone hook launchers without changes to their process flags. Add unit tests for inherited locale variables, parent-environment preservation, and the locale of a real Git child. Assisted-by: GPT-6.1 Sol Signed-off-by: Tyrie Vella <[email protected]>
Add ProcessHelper.RunGit and share process setup with the generic Run helper. Use RunGit for worktree status and checkout so the hooks do not duplicate process flags or require a new project reference. Add unit tests for locale preservation and both output-redirection modes. Assisted-by: GPT-6.1 Sol Signed-off-by: Tyrie Vella <[email protected]>
Tyrie Vella (tyrielv)
marked this pull request as ready for review
November 12, 2026 17:19
Tyrie Vella (tyrielv)
enabled auto-merge
November 12, 2026 17:21
|
[KeithBot]: ✅ No issues found · iteration 1 ( Approach: Right layer: one LC_ALL=C factory in ProcessHelper serves GitProcess.GetGitProcess and the hooks' three Git launches, so every English-text Git classifier is covered by a single policy. Validation
Approving. 🤖 KeithBot · claude-opus-5.5, gpt-6.1-sol, gemini-4-argon + approach review · reply on a thread to dispute |
Keith Klein (KeithIsSleeping)
approved these changes
Nov 12, 2026
This was referenced Nov 17, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and Context
GVFS parses English Git diagnostics to classify configuration errors and recover from corrupt objects or maintenance failures. Git can translate these diagnostics when inherited locale variables select another language. Translated diagnostics can prevent retries or recovery, or cause GVFS to reject a clean worktree.
Changes
LC_ALL=Cin the child environment. This also suppresses gettext translations selected byLANGUAGE.GitProcesscalls, alias queries, worktree status, and worktree checkout. Keep existing arguments, authentication behavior, environment overrides, and process flags.ProcessHelper.RunandProcessHelper.RunGit. Worktree status and checkout useRunGit, so they no longer duplicate process flags.LC_ALL=Coverride for raw configuration reads.LC_ALLwith non-EnglishLANGUAGE. The tests verify parent-environment preservation and alias-query inheritance. TheGitProcesstest runs a real Git child that reports its locale through a command-scoped shell alias.