Repository navigation
refactor(git): build parse_untracked_files on porcelain_entries_z - #4880
Merged
Merged
Conversation
`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.
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.
parse_untracked_fileshad its own loop overgit status --porcelain -zrecords, 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_filesnow keeps that iterator's??records and drops its own copy. Behavior is unchanged, and the existingparse_untracked_filesunit tests, including the rename-source case, pass unmodified. Its only caller is the auto-staging warning inwarn_about_untracked_files.parse_porcelain_zstill walks the records itself, because it returns rename source paths too and the shared iterator drops them.