You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Files with `old mode`/`new mode` extended headers were not parsed
correctly, causing two bugs:
1. `new mode` lines were not recognized as extended headers. The
ExtendedHeader constants included `Old: 'old'` which matches
`old mode ...`, but only had `NewFile: 'new file'` for new-prefixed
headers. Since `'new mode ...'` does not start with `'new file'`,
`parseExtendedHeader` returned null, breaking the extended header
loop prematurely.
2. When `parseFileChange` returned undefined (due to unrecognized
headers and no matching return conditions), `parseFileChanges`
used `break` instead of `continue`, causing ALL subsequent files
in the diff to be silently dropped.
Fixes:
- Add `NewMode: 'new mode'` to ExtendedHeader constants
- Handle mode-only changes (no --- /+++ markers, no chunks) by
falling back to the comparison line path
- Change `parseFileChanges` to skip unparseable entries instead of
aborting the entire parse
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments