Based on a discussion on IRC this is not apparent to everyone so let me write down quick my core workflow:
wget http://drupal.org/something.patch
git apply --index something.patch
... hack
git diff > interdiff.txt
git diff HEAD > new.patch
Should the patch not apply then
patch -p1 < something.patch
... resolve conflicts
... stage the new files
git add `grep -A1 /dev/null something.patch |grep b/|cut -c 7-`
... hack
git diff HEAD > new.patch
Commenting on this Story is closed.
https://drupal.org/project/drush_iq
drush iqa ISSUENUMBER
... hack
drush iqs "Fixed it for you"
The nice thing about iqs (drush iq-submit) is that not only does it produce the interdiff for you, but it also uploads the patch and interdiff and attaches them to the issue, all from the commandline (almost as good as a pull request -- almost).
If there is no patch on the issue yet:
... hack
drush iqs ISSUENUMBER "Fixed it for you"
This tool is fun to use, but not perfect. If the patch doesn't apply, you're on your own (see above). It's fun to use, but largely ignored. The drupal.org migration to Drupal 7 is going to break it; not sure if I will fix it, or if anyone will pick it up, but it's worth a try while it's still working.
- greg.1.anderson
It does look good, I will test, thanks for the tool!