edit-patch

edit-patch is a shell script that allows you to easily polish patches. It’s supposed to be used like this:

  1. Work in your project working copy.
  2. Take a breather.
  3. Invoke edit-patch.
  4. Notice a typo in one of your comments.
  5. Just fix the typo directly inside the patch.
  6. Save and close your editor.
  7. Commit your changes!

Usage

I think you can spot the pattern… The only requirement is that the patch is in unified diff format.

Download

edit-patch.sh

Disclaimer

I take no responsibility for lost code or underpants. I would be very happy if somebody could read through the code, look for obvious traps and notify me about the result.