Skip to content

Conversation

@sourcefrog
Copy link
Collaborator

Stacks after #19

Fixes #20

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for parsing git diffs that move/rename a file without changing its content. It builds on PR #19 which added binary file handling, and fixes issue #20.

Changes:

  • Added parsing support for git file rename operations with "similarity index 100%"
  • Added binary field to Patch struct to distinguish binary file patches
  • Enhanced parser to handle git-specific header lines (diff command and index lines)
  • Updated Display implementation to format rename-only and binary patches

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/parser.rs Added diff_command and git_index_line parsers; modified patch() to handle file renames; added test for git file rename
src/ast.rs Added binary field to Patch struct; updated Display to handle binary and rename-only patches
tests/regressions.rs Updated test to include new binary field
tests/parse_samples.rs Improved error messages with debug formatting
tests/wild-samples/*.patch Added test samples for binary files and file renames
CHANGELOG.md Documented fix for issue #20

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sourcefrog sourcefrog force-pushed the only-file-moves branch 2 times, most recently from 1f22f1a to 048bc25 Compare January 11, 2026 23:04
@sourcefrog sourcefrog requested a review from Copilot January 11, 2026 23:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Fails on files containing only git file moves

1 participant