git.shiar.nl
/
git-grep-footer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
whitelist dashless identifiers Cc and Reference
[git-grep-footer.git]
/
git-grep-footer
diff --git
a/git-grep-footer
b/git-grep-footer
index fa417c114bb41bf8ad9604a7665eb56ae2e0235d..2e42b4a49f576614b139b2f6104028c5b2ae3c00 100755
(executable)
--- a/
git-grep-footer
+++ b/
git-grep-footer
@@
-23,7
+23,7
@@
GetOptions(\my %opt,
local $| = 1;
local $/ = "\0";
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);
my (%headercount, @headercache);
@@
-40,12
+40,12
@@
while (readline) {
# if invalid, assume it's latin1
$_ = decode(cp1252 => $_) if $@;
# if invalid, assume it's latin1
$_ = decode(cp1252 => $_) if $@;
- my $prefix = 0;
my %attr;
BLOCK:
for (reverse split /\n\n/) {
my @headers;
my %attr;
BLOCK:
for (reverse split /\n\n/) {
my @headers;
+ my $prefix = 0;
LINE:
for (split /\n/) {
LINE:
for (split /\n/) {
@@
-85,7
+85,7
@@
while (readline) {
}{<...>}imsx;
}
when (['var', 'vars', '']) {
}{<...>}imsx;
}
when (['var', 'vars', '']) {
- when ($header[0] =~ /[ _-] (?: by | to ) $/imsx) {
+ when ($header[0] =~ /[ _-] (?: by | to ) $
| ^cc$
/imsx) {
$header[1] = undef;
}
for ($header[1]) {
$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
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
followed by a colon.
=head1 OPTIONS