fix(git): properly track both paths in file rename operations#5
Merged
Conversation
Update version numbers across all workspace crates from 2.4.2 to 2.4.3 in Cargo.lock.
Refactor file_statuses() to correctly handle git rename operations by detecting renames and recording both the old path as deleted and the new path as renamed. Previously, renames were not properly tracked on both sides of the rename arrow. Add comprehensive test to verify that both old and new paths are recorded when a file is renamed via git mv.
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.
Summary
file_statuses()to correctly handle git rename operations by recording the old path as deleted (D) and the new path as renamed (R)Test plan
file_statuses_includes_both_sides_of_renameverifying both old and new paths are trackedcargo testto confirm all tests pass