Skip to content

refactor(git): build parse_untracked_files on porcelain_entries_z - #4880

Merged
max-sixty merged 1 commit into
mainfrom
nightly/clean-44993595642-porcelain
Nov 22, 2026
Merged

max-sixty merged 1 commit into
mainfrom
nightly/clean-44993595642-porcelain

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

parse_untracked_files had its own loop over git status --porcelain -z records, including the rule that skips a rename's or copy's source field. porcelain_entries_z, added in #4699, already implements that walk. parse_untracked_files now keeps that iterator's ?? records and drops its own copy. Behavior is unchanged, and the existing parse_untracked_files unit tests, including the rename-source case, pass unmodified. Its only caller is the auto-staging warning in warn_about_untracked_files.

parse_porcelain_z still walks the records itself, because it returns rename source paths too and the shared iterator drops them.

`porcelain_entries_z` (#4699) already walks `git status --porcelain -z`
records and skips the source field of a rename or copy.
`parse_untracked_files` carried its own copy of that loop; it now
filters the shared iterator's `??` records.
@worktrunk-bot worktrunk-bot added the nightly-cleanup Issues found by nightly code quality sweep label Nov 22, 2026
@max-sixty
max-sixty merged commit 2de291c into main Nov 22, 2026
38 of 47 checks passed
@max-sixty
max-sixty deleted the nightly/clean-44993595642-porcelain branch November 22, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nightly-cleanup Issues found by nightly code quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants