Search form

Creating an interdiff

Last updated February 18, 2015.

What is an interdiff and why it is useful?

An interdiff is a text file in patch format that describes the changes between two versions of a patch. Using interdiffs is a best practice that saves time and reduces tedium for reviewers by allowing them to focus on just the changes introduced in patch iterations. You should supply one whenever you update a significant patch in the issue queues (it will be ignored by the Drupal.org Testbots, so make sure that you always upload the full patch too).

Why using interdiff and not just simply diffing two patches?

An interdiff tells you whether lines removed in the second patch were added in the first patch, and similarly, whether lines added in the second patch were removed in the first patch. Simply diffing the two commits does not provide this information, forcing the reviewer to consult the original patch or current source to determine whether this is the case.

Make interdiff ignored by the testbot

If you use .diff extension for interdiff add do-not-test before the .diff. Final pattern will be interdiff-[issue_id]-[old_comment_number]-[new_comment_number]-do-not-test.diff.
For example: interdiff-999999-91-92-do-not-test.diff

If you already have the patch created, try switching back to the main branch and creating the new branch from there and then applying the patch. Otherwise you will get conflicts trying to apply the updated patch to the updated code (from the original patch).