Repository navigation
Git: keep non-ASCII paths, commit large selections via stdin, kill hung reads, and show real errors - #2021
Merged
currentbits merged 4 commits intoNov 13, 2026
Conversation
…uncation
The @-mention file list and content search ran git ls-files and git grep
without -z, so git octal-escaped non-ASCII names ("caf\303\251.txt") into
paths that do not exist. Both now use -z and split on NUL.
lsFiles also cut repos at 20,000 paths without saying so. It now returns a
truncated flag: files:list passes it to the caller, and the Files pane's
existing truncated flag (whose cap matched lsFiles' cap, so it never fired
for git repos) now honours it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Committing a selection put every path on git's command line (Git pane commit, partial-hunk commit, and the merge-time session commit), so a large selection failed with E2BIG on macOS/Linux or hit Windows' 32K command-line limit. pathspecArgs keeps today's argv for normal selections and switches to --pathspec-from-file=- --pathspec-file-nul past 8,000 chars; gitTry gains an input option to write that stdin. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A timed-out git got one SIGTERM and nothing more. If it ignored that, the async helpers (execCommandAsync, gitOutAsync, gitTryAsync) never called back, and sync gitOut/gitTry blocked the main process until git exited. Async: escalateKill SIGKILLs the child KILL_FALLBACK_MS (2s) after the timeout and drops its pipes, so the call rejects or resolves as timed out even when a hook grandchild holds stdout. Sync: execFileSync sends only one signal, so read-only commands (already lock-free under GIT_OPTIONAL_LOCKS=0) now time out with SIGKILL; writes keep SIGTERM so git can still remove its index.lock. Co-Authored-By: Claude Opus 5.5 <[email protected]>
gitStatus and isInsideWorkTree turned every git failure into "not a repository", so "detected dubious ownership", timeouts and ssh errors were hidden, and adding such a project as a new one tried `git init` on an existing repo. Only git's "not a git repository" (or a missing directory or binary) now reads as not-a-repo; other failures throw with git's message, so git:status rejects with it and addProject reports it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
currentbits
deleted the
coder/reliability-git-path-handling-timeouts-a-e4a088
branch
November 13, 2026 16:11
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.
Four git reliability fixes.
lsFilesandsearchFilesran without-zorcore.quotepath=off, so git returned quoted octal-escaped names ("caf\303\251.txt") that don't exist. @-mention and file search now get real UTF-8 paths.lsFilesalso returns{ files, truncated }, so hitting the 20,000-file cap is visible to the file tree instead of silent.--pathspec-from-file=- --pathspec-file-nul). Small selections behave the same..git/index.lock, and Solenta can't recover from that.gitStatusandisInsideWorkTreereported every failure as "not a repo", hiding problems like dubious ownership or a timeout. Now only git's "not a git repository" message, or a missing directory or binary, means not a repo. Any other failure throws with git's own message. A failed SSH connection to a remote project now shows as an error instead of "not a repo".Tests: new
electron/test/git-not-a-repo.test.jsandgit-timeout-kill.test.js, plus new cases inworktrees-commit.test.jsandworktrees-searchfiles.test.js. 33 of 33 pass. The full Electron suite didn't finish locally, so CI is the first full run.🤖 Generated with Claude Code