From a40fdfe25b3e4f6b7a4e6e3d5d3e4fa31ac9334f Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 20 Apr 2009 08:24:31 +0000 Subject: Support patch-author header per nick's request git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@383 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- parse-git | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/parse-git b/parse-git index 2e28fb7..60c529e 100755 --- a/parse-git +++ b/parse-git @@ -50,6 +50,7 @@ die ("Project is not a nice name.\n") unless defined $project; my $subject; my $who; my $date; +my $author; open (MAIL, $ARGV[1]) || die ("Cannot open $ARGV[1]: $!\n"); my @mail = ; @@ -70,6 +71,9 @@ while (defined($line = shift @mail)) { } elsif ($chomped =~ m/^From: (.*)/) { $who = $1; next; + } elsif ($chomped =~ m/^Patch-Author: (.*)/) { + $author = $1; + next; } } @@ -91,7 +95,11 @@ my $at; if (defined $date) { $at = " at $date"; } -$subject =~ s/\[([^\]]*)\] /in $1: /; -print MAIL "$who$at $subject\n"; +my $by; +if (defined $author) { + $by = " by $by"; +} +$subject =~ s/\[([^\]]*)\] /to $1: /; +print MAIL "$who committed patch$by$at $subject\n"; close(MAIL); -- cgit v1.2.3