Skip to content

enhance: query local changes with git status --porcelain=v2 -z - #2872

Open
bertyhell wants to merge 1 commit into
sourcegit-scm:developfrom
bertyhell:perf/status-porcelain-v2
Open

bertyhell wants to merge 1 commit into
sourcegit-scm:developfrom
bertyhell:perf/status-porcelain-v2

Conversation

@bertyhell

@bertyhell bertyhell commented Nov 9, 2026 •

Copy link
Copy Markdown
image

The porcelain v1 output parsed before is line based and C-quotes paths
containing special characters (", \, tab, newline...), and renames are
reported as old -> new text. Such paths were shown and used with their
escape sequences (e.g. quo\"te.txt), and a path containing -> could be
split wrongly.

Use the NUL-separated porcelain v2 format instead: paths are never quoted
and the original path of a rename/copy is a separate field. Every status
combination maps to the same ChangeState/ConflictReason as before.

🤖 Generated with Claude Code

The porcelain v1 output parsed before is line based and C-quotes paths
containing special characters (`"`, `\`, tab, newline...), and renames are
reported as `old -> new` text. Such paths were shown and used with their
escape sequences (e.g. `quo\"te.txt`), and a path containing ` -> ` could be
split wrongly.

Use the NUL-separated porcelain v2 format instead: paths are never quoted
and the original path of a rename/copy is a separate field. Every status
combination maps to the same `ChangeState`/`ConflictReason` as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KCxH1zwDXLd9kfAAkcf6PZ

This branch has not been deployed

No deployments
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.

2 participants