Skip to content

Conversation

@kerneltoast
Copy link
Contributor

When a fuzz factor of 3 results in an incorrect patch application, the final interdiff output is harder to review than when the fuzz factor is 2. This is especially the case because it's common for rejected hunks from both files to appear back-to-back, making the rejected hunks easy to review.

Turn down the fuzz factor to the default of 2 to avoid results that are very confusing.

When a fuzz factor of 3 results in an incorrect patch application, the
final interdiff output is harder to review than when the fuzz factor is 2.
This is especially the case because it's common for rejected hunks from
both files to appear back-to-back, making the rejected hunks easy to
review.

Turn down the fuzz factor to the default of 2 to avoid results that are
very confusing.
@kerneltoast
Copy link
Contributor Author

When a fuzz factor of 3 goes wrong, boy oh boy does it go really wrong. :lolsob:

Copilot finished reviewing on behalf of kerneltoast November 25, 2025 23:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR changes the interdiff fuzzy matching configuration from an explicit fuzz factor of 3 to the default fuzz factor of 2. The change aims to improve the reviewability of interdiff output when comparing backported kernel commits with their upstream counterparts, particularly when patch application fails and generates rejected hunks.

Key Changes:

  • Modified the interdiff command to use --fuzzy (default fuzz factor of 2) instead of --fuzzy=3

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

with tempfile.NamedTemporaryFile(mode="w", suffix=".patch", delete=False) as up:
up.write(upstream_patch)
up_path = up.name

Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

[nitpick] The change from --fuzzy=3 to --fuzzy relies on the default fuzz factor being 2. Consider adding a comment explaining this default behavior for future maintainability, e.g.:

# Use default fuzz factor of 2 for better patch application results
[interdiff_path, "--fuzzy", bp_path, up_path]

This would make the intent clearer and document the assumed default value.

Suggested change
# Use default fuzz factor of 2 for better patch application results

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

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

🥌

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