[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [githax/master] Make mail hook put commit ID in message body.
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue, 28 Apr 2009 23:47:47 -0400
Subject: Make mail hook put commit ID in message body.
---
hooks/copyheaders.pl | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/hooks/copyheaders.pl b/hooks/copyheaders.pl
index ce14a47..4b7e61c 100755
--- a/hooks/copyheaders.pl
+++ b/hooks/copyheaders.pl
@@ -3,14 +3,20 @@
$from = "";
$subject = "";
$date = "";
+$commit = "";
while(<>) {
print;
chomp;
- if (/^From: (.*)/) { $from = $1; }
- if (/^Subject: \[[^\]]*\] *(.*)/) { $subject = $1; }
- if (/^Date: (.*)/) { $date = $1; }
- if (/^$/) { print "Author: $from\nDate: $date\nSubject: $subject\n\n"; last; }
+ if (/^From ([A-Fa-f0-9]+)/) { $commit = $1; }
+ elsif (/^From: (.*)/) { $from = $1; }
+ elsif (/^Subject: \[[^\]]*\] *(.*)/) { $subject = $1; }
+ elsif (/^Date: (.*)/) { $date = $1; }
+ elsif (/^$/) {
+ print "Author: $from\nDate: $date\nSubject: $subject\n";
+ print "Commit: $commit\n\n";
+ last;
+ }
}
while(<>) { print; }
--
1.5.6.5