whitelist dashless identifiers Cc and Reference
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 4 Feb 2011 06:11:12 +0000 (07:11 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Fri, 4 Feb 2011 06:11:12 +0000 (07:11 +0100)
git-grep-footer

index c39222fd9d6a3280cd817d88d72e1d086bfc8a64..2e42b4a49f576614b139b2f6104028c5b2ae3c00 100755 (executable)
@@ -23,7 +23,7 @@ GetOptions(\my %opt,
 local $| = 1;
 local $/ = "\0";
 
-my $HEADERMATCH = qr/ [a-z]+ (?: (?:-\w+)+ | \ by ) /ix;
+my $HEADERMATCH = qr/ [a-z]+ (?: (?:-\w+)+ | \ by ) | cc | reference /ix;
 
 my (%headercount, @headercache);
 
@@ -85,7 +85,7 @@ while (readline) {
                                        }{<...>}imsx;
                                }
                                when (['var', 'vars', '']) {
-                                       when ($header[0] =~ /[ _-] (?: by | to ) $/imsx) {
+                                       when ($header[0] =~ /[ _-] (?: by | to ) $ | ^cc$/imsx) {
                                                $header[1] = undef;
                                        }
                                        for ($header[1]) {
@@ -163,6 +163,7 @@ a common convention to list custom metadata such as
 C<Signed-off-by> and C<Acked-by>.
 
 Sections are identified by at least one leading keyword containing a dash
+(or exceptionally recognised)
 followed by a colon.
 
 =head1 OPTIONS