From 5c70d80c2cf4bf994fdb124f402fad431b8f781f Mon Sep 17 00:00:00 2001 From: Penny Leach Date: Tue, 15 Sep 2009 12:57:20 +0200 Subject: [PATCH] add formatpatches, small helper for turning git log output into patches --- bin/formatpatches | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 bin/formatpatches 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 -- 2.39.5