lkml.org 
[lkml]   [2009]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [PATCH 5/7] MAINTAINERS: Remove L:
    From
    Date
    On Thu, 2009-07-09 at 16:08 +0100, Mark Brown wrote:
    > That's pretty much what I was thinking of too - tweaking the values for
    > the log queries based on the total number of hits so people only turn up
    > if they did a certain proportion of the commits. It'd take some
    > experimentation to work out what the values to use should be, I guess.

    Perhaps something like this:

    diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
    index 7fc09fc..a97f248 100755
    --- a/scripts/get_maintainer.pl
    +++ b/scripts/get_maintainer.pl
    @@ -27,6 +27,7 @@ my $email_git = 1;
    my $email_git_penguin_chiefs = 0;
    my $email_git_min_signatures = 1;
    my $email_git_max_maintainers = 5;
    +my $email_git_min_percent = 0;
    my $email_git_since = "1-year-ago";
    my $output_multiline = 1;
    my $output_separator = ", ";
    @@ -65,6 +66,7 @@ if (!GetOptions(
    'git-chief-penguins!' => \$email_git_penguin_chiefs,
    'git-min-signatures=i' => \$email_git_min_signatures,
    'git-max-maintainers=i' => \$email_git_max_maintainers,
    + 'git-min-percent=i' => \$email_git_min_percent,
    'git-since=s' => \$email_git_since,
    'm!' => \$email_maintainer,
    'n!' => \$email_usename,
    @@ -307,6 +309,7 @@ MAINTAINER field selection options:
    --git-chief-penguins => include ${penguin_chiefs}
    --git-min-signatures => number of signatures required (default: 1)
    --git-max-maintainers => maximum maintainers to add (default: 5)
    + --git-min-percent => minimum percentage of commits required (default: 0)
    --git-since => git history to use (default: 1-year-ago)
    --m => include maintainer(s) if any
    --n => include name 'Full Name <addr\@domain.tld>'
    @@ -497,6 +500,7 @@ sub recent_git_signoffs {
    my $output = "";
    my $count = 0;
    my @lines = ();
    + my $total_sign_offs;

    if (which("git") eq "") {
    warn("$P: git not found. Add --nogit to options?\n");
    @@ -520,6 +524,14 @@ sub recent_git_signoffs {
    $output =~ s/^\s*//gm;

    @lines = split("\n", $output);
    +
    + $total_sign_offs = 0;
    + foreach my $line (@lines) {
    + if ($line =~ m/([0-9]+)\s+(.*)/) {
    + $total_sign_offs += $1;
    + }
    + }
    +
    foreach my $line (@lines) {
    if ($line =~ m/([0-9]+)\s+(.*)/) {
    my $sign_offs = $1;
    @@ -529,6 +541,11 @@ sub recent_git_signoffs {
    $count > $email_git_max_maintainers) {
    last;
    }
    + if ($email_git_min_percent > 0 &&
    + (($sign_offs * 100 / $total_sign_offs) < $email_git_min_percent)
    + ) {
    + last;
    + }
    } else {
    die("$P: Unexpected git output: ${line}\n");
    }



    \
     
     \ /
      Last update: 2009-07-09 21:39    [W:0.032 / U:0.048 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site