On Fri, 2022-09-09 at 10:57 -0700, Joe Perches wrote: > On Fri, 2022-09-09 at 09:40 +0200, niklas.soderlund@xxxxxxxxxxxx wrote: > > On 2022-09-08 17:49:14 +0000, Philippe Schenker wrote: [] > > > I would check all lines that start with fixes, even if there is > > > whitespace in front (and then failing later on...) > > > > > > if (!$in_header_lines && $line =~ /^\s*fixes:?/i) { > > I think that's a poor idea. > > You should really review git history for lines that start with fixes > and look at the number of false positives that would give. > > Try this grep: > > $ git log -100000 --no-merges --grep="^\s*fixes" -i --format=email -P | \ > grep -P -i "^\s*fixes)" | \ > grep -P -v "^Fixes: [0-9a-f]{12,}' > [...] > > That is a greater than 10% false positive rate. One day I'll be better at typing grep commands in the editor... Try: $ git log -100000 --no-merges --grep="^\s*fixes" -i --format=email -P | \ grep -P -i "^\s*fixes" | \ grep -P -v "^Fixes: [0-9a-f]{12,}"