Skip to content

Instantly share code, notes, and snippets.

View jlebar's full-sized avatar

Justin Lebar jlebar

View GitHub Profile
@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
"""