Skip to content

Strip trailing tab from parsed paths with spaces - #94

Open
Bortlesboat wants to merge 1 commit into
GrantBirki:mainfrom
Bortlesboat:strip-path-trailing-tab
Open

Bortlesboat wants to merge 1 commit into
GrantBirki:mainfrom
Bortlesboat:strip-path-trailing-tab

Conversation

@Bortlesboat

Copy link
Copy Markdown

When a path contains a space, git ends the ---/+++ lines with a tab and parse-git-diff keeps it, so json-diff reports paths like "space name.txt\t" for added, changed, and deleted files. This strips that tab after parsing (renames were already correct since they come from the rename from/to lines). CONTRIBUTING mentions this as a known parser quirk to fix separately, so this is that change.

Added a fixture generated with real git diff covering all four file types, updated the acceptance test that was asserting the old value, and dropped the CONTRIBUTING note. script/all and script/verify-bundle pass on Node 24.14.0 with 100% coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant