Conversation
r3wretrhy
force-pushed
the
fix-git-name-only-quoting
branch
from
September 16, 2026 20:53
18a02fa to
c6f1c49
Compare
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.
fix(git): keep special-character paths from git name-only listings
git diff --name-onlyandgit ls-files --othersC-quote paths that contain"or non-ASCII whencore.quotepathis on.fetchChangedFilesthen split those quoted lines, soyarn workspaces list --sinceattributed the change to the root workspace instead of the real one.Pass
-zand split on NUL so each path stays one entry.Fixes #6804
What's the problem this PR addresses?
When a changed file has special characters in the name (for example
"),git diff --name-onlywraps the path in C-quotes.fetchChangedFilessplit on newlines and treated that quoted string as the path, sotryWorkspaceByFilePathmissed the workspace andyarn workspaces list --sincereported the root instead.Closes #6804
How did you fix it?
Use
git diff -z --name-onlyandgit ls-files -z --others --exclude-standard, then split the stdout on NUL. Same listing, no quoting.Testing
yarn test:unit packages/plugin-git/tests/gitUtils.test.ts— 91 passed, including a temp-repo regression that stages and leaves untracked files whose names git would C-quote.--since keeps workspaces whose changed files have special characters in the namenext to the existing--sincelist tests.Checklist