Repository navigation
Read a path with spaces from a patch section that has only a header - #1547
Open
JaynouOliver wants to merge 1 commit into
Open
JaynouOliver wants to merge 1 commit into
JaynouOliver wants to merge 1 commit into
Conversation
JaynouOliver
marked this pull request as ready for review
November 14, 2026 23:01
Git does not quote a space in the `diff --git` header, and the header was split on whitespace. A binary file, a mode-only change or an empty file added or deleted has no `---` / `+++` lines to fall back on, so `a/docs/Screen Shot 1.png b/docs/Screen Shot 1.png` came back as the path `Shot`. Outside a rename both sides name the same path, so the header is split at its middle first and tokenized as before when the halves differ.
JaynouOliver
force-pushed
the
fix/patch-header-paths-with-spaces
branch
from
November 17, 2026 05:33
140a9ee to
f152c5c
Compare
This branch has not been deployed
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.
splitGitPatchFilesfalls back to thediff --githeader when a section has no---/+++lines: a binary file, a mode-only change, or an empty file added or deleted. Git does not quote a space there and the header was split on whitespace, sodiff --git a/docs/Screen Shot 1.png b/docs/Screen Shot 1.pnggave the pathShot.Outside a rename both sides name the same path, so the header is now split at its middle first, and tokenized as before when the halves differ.
Tested with
pnpm --filter @dev.fast/local-vcs test: the new test fails without the change (1 failed) and the package passes with it (80 passed | 5 skipped).Not verified: the full
pnpm run ci, jj, a running Desktop. No issue exists for this.