Skip to content

Add handling for content changes in rename entries#4

Merged
sile merged 3 commits intomainfrom
rename-with-index
Jan 21, 2025
Merged

Add handling for content changes in rename entries#4
sile merged 3 commits intomainfrom
rename-with-index

Conversation

@sile
Copy link
Copy Markdown
Owner

@sile sile commented Jan 21, 2025

Copilot Summary

This pull request includes several updates to the src/diff.rs file to enhance the handling of file diffs, particularly for renamed files. The changes ensure that content diffs are correctly processed and displayed for various file operations. The most important changes include adding content handling for renamed files, updating the FileDiff enum, and modifying the impl FileDiff methods to support these enhancements.

Enhancements to file diff handling:

  • src/diff.rs: Modified ChunkDiff to provide a more descriptive error message when encountering an unexpected diff line.
  • src/diff.rs: Updated the FileDiff enum to include an optional content field for renamed files.
  • src/diff.rs: Enhanced the chunks method in impl FileDiff to handle content for renamed files.
  • src/diff.rs: Added content parsing logic for renamed files in the parse_with_similarity_index method. [1] [2]

Improvement to diff summary display:

  • src/widget_diff_tree.rs: Updated the DiffTreeNodeContent implementation for FileDiff to include a summary of content changes for renamed files.

@sile sile merged commit b6b12ab into main Jan 21, 2025
@sile sile deleted the rename-with-index branch January 21, 2025 10:09
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