From: Mischa POSLAWSKY Date: Fri, 4 Feb 2011 06:11:12 +0000 (+0100) Subject: whitelist dashless identifiers Cc and Reference X-Git-Url: http://git.shiar.net/git-grep-footer.git/commitdiff_plain/8fe9f6baac5b1fde96dfb345f1b3676cd3894c0b whitelist dashless identifiers Cc and Reference --- diff --git a/git-grep-footer b/git-grep-footer index c39222f..2e42b4a 100755 --- a/git-grep-footer +++ b/git-grep-footer @@ -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 and C. Sections are identified by at least one leading keyword containing a dash +(or exceptionally recognised) followed by a colon. =head1 OPTIONS