On Thu, 2019-09-26 at 08:53 -0700, Kees Cook wrote: > On Thu, Sep 26, 2019 at 08:14:03AM -0700, Joe Perches wrote: > > On Wed, 2019-09-25 at 11:40 -0700, Kees Cook wrote: > > > Is "6" a safe lower bound here? I thought 12 was the way to go? > > [] > > > $ git log | egrep 'Fixes: [a-f0-9]{1,40}' | col2 | awk '{print length }' | sort | uniq -c | sort -n | tail > > > 238 8 > > > 300 7 > > > 330 14 > > > 344 6 > > > 352 11 > > > 408 40 > > > 425 10 > > > 735 16 > > > 1866 13 > > > 31446 12 > > > > > > Hmpf, 6 is pretty high up there... > > > > Yes, but your grep then col2 isn't right. > > You are counting all the 'Fixes: commit <foo>' output > > as 6 because that's the length of 'commit'. > > the [a-f0-9]{1,40} already excludes "commit". No it doesn't as commit starts with c which matches [a-f0-9]{1,40} Try your original egrep command line yourself. Maybe use: $ git log | egrep 'Fixes: [a-f0-9]{1,40}' | awk '{ if (length($2) == 6) { print $0;} }' The first few matches are the commit referenced in Fixes: below replaced the call to Fixes: commit 18a992787896 ("ARM: ux500: move soc_id driver to drivers/soc") Fixes: commit 0580dde59438 ("ASoC: simple-card-utils: add asoc_simple_debug_info()") Since Fixes: 8c5421c016a4 ("perf pmu: Display pmu name when printing Fixes: commit 961fb3c206dc ("ASoC: rockchip: rk3399_gru_sound: don't select unnecessary Platform") > > I also think the length of the hex commit value doesn't > > matter much as it's got to be a specific single commit > > SHA1 anyway, otherwise the commit id lookup will fail. > > Fail enough. We do already have 6-digit SHA1 collisions, so it seemed > like using more than 6 would be nicer? *shrug* I don't have a strong > opinion. :) > > > > > > @@ -1031,6 +1040,7 @@ MAINTAINER field selection options: > > > > --roles => show roles (status:subsystem, git-signer, list, etc...) > > > > --rolestats => show roles and statistics (commits/total_commits, %) > > > > --file-emails => add email addresses found in -f file (default: 0 (off)) > > > > + --fixes => for patches, add signatures of commits with 'Fixes: <commit>' (default: 1 (on)) > > > > > > Should "Tested-by" and "Co-developed-by" get added to @signature_tags ? > > > > All "<foo>-by:" signatures are added. > > Ah, I'd missed where that happened. I do note that's only when > git-all-signature-types is set, which is default 0. (/me goes to add > this to his invocations...) > > my $email_git_all_signature_types = 0; > ... > if ($email_git_all_signature_types) { > $signature_pattern = "(.+?)[Bb][Yy]:"; > } else { > $signature_pattern = "\(" . join("|", @signature_tags) . "\)"; > } > > > > @commit_authors is unused? > > > > Yes, authors are already required to sign-off so > > it's just duplicating already existing signatures. > > Sure, it just seemed odd to populate it if it wasn't going to be used. It's a generic function.