lintdiff: use git diff --merge-base in one step#5633
Merged
Merged
Conversation
lintdiff.py resolved the merge base in two git calls (git merge-base then git diff <base>); --merge-base does the same in one. Output is byte-for-byte identical on the success path. This follows up the reviewer note on #5551, which switched testmask to the three-dot "ref...HEAD" form for the same "diff against the branch point, not the ref tip" reason and pointed at lintdiff.py as the other merge-base site. Unlike three-dot (which compares two commits), lintdiff keeps diffing against the working tree so the --fix flow still lints uncommitted changes. Co-authored-by: Isaac
denik
approved these changes
Jun 17, 2026
Collaborator
Integration test reportCommit: 834b385
21 interesting tests: 14 SKIP, 4 RECOVERED, 3 flaky
Top 24 slowest tests (at least 2 minutes):
|
Collaborator
Integration test reportCommit: 6745dc1
565 interesting tests: 494 MISS, 37 FAIL, 21 RECOVERED, 7 KNOWN, 4 PANIC, 2 SKIP
Top 50 slowest tests (at least 2 minutes):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lintdiff.pyresolved the merge base in two git calls (git merge-basethengit diff <base>);--merge-basedoes the same in one. Output is byte-for-byte identical on the success path.This follows up the reviewer note on #5551, which switched testmask to the three-dot
ref...HEADform for the same "diff against the branch point, not the ref tip" reason and pointed atlintdiff.pyas the other merge-base site. Unlike three-dot (which compares two commits), lintdiff keeps diffing against the working tree so the--fixflow still lints uncommitted changes — now noted in the comment.This pull request and its description were written by Isaac.