interdiff - show differences between two diff files
interdiff creates a unified format diff that expresses the difference between two diffs.
The diffs must both be relative to the same files.
For best results, the diffs must have at least three lines of context.
An interdiff
is a text file in patch format that describes the changes between two versions of a patch. Using interdiff
s 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).
Create interdiff using git
//Always pull the latest changes.
git pull --rebase
//Create a branch for the old patch.
git checkout -b my_first_branch
// Download the old version of the patch you wish
// to update and apply it to your local git repository.
git apply --index patchname.patch
// Commit the changes from the old patch.
git commit -m "my_first_branch"
// Depending on how you like to work, you now have a choice between
// two options. If you do not yet have a new patch created, you can now
// create a new branch.
git checkout -b my_second_branch
// Otherwise, let's go back to the mainline branch and create a
// new branch to patch from.
git checkout any_reuired_commit_id
git checkout -b my_second_branch
// Make your changes on the new branch (e.g. apply your new patch),
// then commit the changes.
git commit -m "my_second_branch"
// Generate the interdiff by comparing the current (new) branch against
// the old branch.
git diff my_first_branch > interdiff-my_first_branch-[new_comment_number].txt
// You can create the updated patch easily at this point with:
git diff any_reuired_commit_id > my_second_branch.patch