Skip to content

fix: parse binary rename diff stats - #1180

Draft
liyimil wants to merge 2 commits into
steveukx:mainfrom
liyimil:agent/fix-binary-rename-diff
Draft

fix: parse binary rename diff stats#1180
liyimil wants to merge 2 commits into
steveukx:mainfrom
liyimil:agent/fix-binary-rename-diff

Conversation

@liyimil

@liyimil liyimil commented Jul 18, 2026

Copy link
Copy Markdown

What changed

  • parse binary diff-stat entries that omit before/after byte counts
  • retain the renamed path and mark the entry as binary with zero byte counts
  • add regression coverage for a binary rename summary
  • add a patch changeset

Why

Git emits binary renames as path | Bin, without the before -> after bytes section. The existing parser only recognizes the sized form, leaving DiffSummary.files empty for renames.

Fixes #885.

Checks

  • yarn workspace simple-git jest --runInBand test/unit/diff.spec.ts (23 tests passed)
  • yarn tsc -p simple-git/tsconfig.release.json --noEmit
  • Biome check for all changed files
  • git diff --check

Prepared with Codex assistance; the diff was reviewed and the checks above were run locally.

@changeset-bot

changeset-bot Bot commented Jul 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8a9f22c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
simple-git Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@steveukx

Copy link
Copy Markdown
Owner

Hi, please can you add an integration test to this PR along with the unit test. Thanks

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.

DiffSummary list of files empty when renaming a binary

2 participants