Skip to content

Conversation

@bmastbergen
Copy link
Collaborator

This is a wrapper for running interdiff on pr commits that are backports of upstream kernel commits. The calling convention is similar to check_kernel_commits, where you pass the kernel-src-tree repo, the pr branch, and base branch as arguments. The script then looks though each pr commit looking for backported upstream commits, and calls interdiff to check for differences between the referenced upstream commit and the pr commit itself.

As with check_kernel_commits the --markdown argument adds a little flair for embedding the output in a github comment

The --interdiff argument allows for passing an alternative path for which interdiff executable is used. This will likely be used by the calling github action to use a custom built interdiff until mainline interdiff can do the fuzzy matching we like.

An example of how this could be integrated into our existing upstream_commit_check github action workflow is available here:
ctrliq/kernel-src-tree@f8718c0

An example of its output as a github comment is available here:
ctrliq/kernel-src-tree#621 (comment)

This was written by claude BTW. Claude used check_kernel_commits as inspiration so the calling convention and code would be similar. Hopefully similar code could be pulled out into a library and shared some day.

Copy link
Collaborator

@PlaidCat PlaidCat left a comment

Choose a reason for hiding this comment

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

I have some nitpicks, but they're the same hole I fell into using Claude as well.

print("Please install patchutils or specify path with --interdiff")
sys.exit(1)

# Validate that all required refs exist
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will be interesting to see if this works with remote fork PRs

Copy link
Collaborator

Choose a reason for hiding this comment

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

Non-Blocking

@kerneltoast
Copy link
Contributor

The final version of the fuzzy feature that I submitted as a PR upstream (twaugh/patchutils#147) requires passing --fuzzy to interdiff to trigger the fuzzy diffing, FYI.

@bmastbergen bmastbergen force-pushed the interdiff branch 2 times, most recently from e2d3547 to 9da07b2 Compare October 22, 2025 14:46
@bmastbergen bmastbergen requested a review from PlaidCat October 22, 2025 14:53
This is a wrapper for running interdiff on pr commits that are
backports of upstream kernel commits.  The calling convention is
similar to check_kernel_commits, where you pass the kernel-src-tree
repo, the pr branch, and base branch as arguments.  The script then
looks though each pr commit looking for backported upstream commits,
and calls interdiff to check for differences between the referenced
upstream commit and the pr commit itself.

As with check_kernel_commits the --markdown argument adds a little
flair for embedding the output in a github comment

The --interdiff argument allows for passing an alternative path
for which interdiff executable is used.  This will likely be used
by the calling github action to use a custom built interdiff
until mainline interdiff can do the fuzzy matching we like.
@bmastbergen
Copy link
Collaborator Author

The final version of the fuzzy feature that I submitted as a PR upstream (twaugh/patchutils#147) requires passing --fuzzy to interdiff to trigger the fuzzy diffing, FYI.

Cool. Added --fuzzy to interdiff call

Copy link
Collaborator

@PlaidCat PlaidCat left a comment

Choose a reason for hiding this comment

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

I'm good with this first pass and getting a 80%+ code in place

@bmastbergen bmastbergen merged commit 9543770 into mainline Oct 22, 2025
@bmastbergen bmastbergen deleted the interdiff branch October 22, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants