From: Penny Leach Date: Tue, 15 Sep 2009 10:57:20 +0000 (+0200) Subject: add formatpatches, small helper for turning git log output into patches X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5c70d80c2cf4bf994fdb124f402fad431b8f781f;p=scripts.git add formatpatches, small helper for turning git log output into patches --- diff --git a/bin/formatpatches b/bin/formatpatches new file mode 100755 index 0000000..47ccbb4 --- /dev/null +++ b/bin/formatpatches @@ -0,0 +1,22 @@ +#!/usr/bin/perl -w + +# run this like: +# git log --reverse | bin/formatpatches +# inspect the output, then run again with | sh on the end + +use strict; +use warnings; + + +my $count = 0; + +while (<>) { + next unless /^commit ([a-z0-9]+)$/; + my $hash = $1; + + print "git format-patch --start-number $count $hash^..$hash\n"; + $count++; +} + + +1