Skip to content

Stop rename and copy lookahead at the next file - #610

Merged
rtfpessoa merged 1 commit into
masterfrom
rodrigo/fix-rename-lookahead
Nov 28, 2026
Merged

rtfpessoa merged 1 commit into
masterfrom
rodrigo/fix-rename-lookahead

Conversation

@rtfpessoa

Copy link
Copy Markdown
Owner

Motivation

Follow-up to Gal Be’s #608. A rename or copy without a hunk can inherit a later file’s hunk during lookahead. That makes the parser ignore explicit rename/copy metadata, which is needed when an unquoted path contains b/.

Summary

Stop the hunk lookahead at the same file boundary the parser uses. Real Git rename and copy regressions fail on the previous parser and pass with the fix. All 129 tests and 76 snapshots pass locally; lint and formatting pass.

Signed-off-by: Rodrigo Fernandes <rodrigo.fernandes@datadoghq.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying diff2html with  Cloudflare Pages  Cloudflare Pages

Latest commit: a283a82
Status: ✅  Deploy successful!
Preview URL: https://be06299f.diff2html.pages.dev
Branch Preview URL: https://rodrigo-fix-rename-lookahead.diff2html.pages.dev

View logs

@rtfpessoa
rtfpessoa marked this pull request as ready for review November 28, 2026 16:54
@rtfpessoa
rtfpessoa merged commit 0a50d96 into master Nov 28, 2026
8 checks passed
@rtfpessoa
rtfpessoa deleted the rodrigo/fix-rename-lookahead branch November 28, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant