Skip to content

Instantly share code, notes, and snippets.

@mmuman
mmuman / reorder-patch
Last active August 29, 2015 14:11 — forked from jlebar/reorder-patch
#!/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
"""