Skip to content

Instantly share code, notes, and snippets.

@jlebar
jlebar / reorder-patch
Created August 31, 2012 01:49
Reorder a patch file so it's easier to review
#!/usr/bin/env python
"""Re-order the files in a patch according to a set of rules.
Input is accepted on stdin, and written to stdout.
Usage: cat patch | reorder-patch > reordered-patch
"""