Repository navigation
Conversation
This was referenced Oct 28, 2026
Collaborator
Author
|
This only affects POSIX filenames containing a literal backslash, an exotic case. The change also covers only the index reader: readGitBlobAtOidPath still rewrites backslashes, so a staged diff would compare HEAD:odd/name.txt with :odd\name.txt. Runtime/mobile/remote paths are normalized upstream in runtime-relative-paths.ts, so they are not fixed either. If pursued, handle both readers together in #27757. |
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.
Opening the unstaged diff for a POSIX file named
odd\name.txtcan read the index entry for the distinct fileodd/name.txt. Staged additions can also appear empty when the rewritten path is absent. Preserve literal POSIX backslashes in index blob reads by converting only the executing host's path separator. Native Windows and Windows-host WSL keep their current separator conversion.This changes one production line. Git commands, read limits, cache identity, IPC/RPC contracts and index contents remain unchanged.
Validation:
pnpm check:changed --base=2d3e7e452000c26433650d75422e79a06be80684 --maxWorkers=2: 19/20 checks passed in 643.8 seconds. The broad affected unit selection was stopped after 641.6 seconds without an aggregate test result; verified process ancestry, cwd and start times before stopping its four owned processes. Formatting, lint/code-quality, typechecks and remaining ratchets passed. The aggregate gate is not green. An initial test-only type-import lint finding was corrected before this final run.Integration and limits: #27757 fixes the runtime path validator and committed/OID blob reader; it leaves the index reader unchanged. This draft deliberately fixes that remaining index boundary. Until #27757 is integrated, runtime requests can still lose the filename before this reader and staged/HEAD comparisons can still use the wrong committed side; the standalone evidence retains those failing-side controls. #34778 separately fixes old-Git
showrevision/path fallback and missing-path classification: preserve itscat-file/targeted absence checks together with this host-separator conversion. #34767, #34967 and #35084 also touch the blob reader; retain their limits, incomplete-read handling and link classification during integration. Submodule path routing has separate normalization and is outside this scope.