09 Aug, 2017

1 commit

  • Allow for MAINTAINERS to become a directory and if it is,
    read all the files in the directory for maintained sections.

    Optionally look for all files named MAINTAINERS in directories
    excluding the .git directory by using --find-maintainer-files.

    This optional feature adds ~.3 seconds of CPU on an Intel
    i5-6200 with an SSD.

    Miscellanea:

    - Create a read_maintainer_file subroutine from the existing code
    - Test only the existence of MAINTAINERS, not whether it's a file

    Signed-off-by: Joe Perches
    Signed-off-by: Linus Torvalds

    Joe Perches
     

14 May, 2017

1 commit

  • The default NetBSD package manager is pkgsrc and it installs Perl
    along other third party programs under custom and configurable prefix.
    The default prefix for binary prebuilt packages is /usr/pkg, and the
    Perl executable lands in /usr/pkg/bin/perl.

    This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
    the most portable solution that should work for almost everybody.
    Perl's executable is detected automatically.

    This change switches -w option passed to the executable with more
    modern "use warnings;" approach. There is no functional change to the
    default behavior.

    While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).

    Signed-off-by: Kamil Rytarowski
    Signed-off-by: Masahiro Yamada

    Kamil Rytarowski
     

13 Dec, 2016

1 commit

  • Jani Nikula proposes patches to add a few new letter prefixes for "B:"
    bug reporting and "C:" maintainer chatting to the various sections of
    MAINTAINERS.

    Add a generic mechanism to get_maintainer.pl to find sections that have
    any combination of "[A-Z]" letter prefix types in a section.

    Link: http://lkml.kernel.org/r/1477332323.1984.8.camel@perches.com
    Signed-off-by: Joe Perches
    Cc: Jani Nikula
    Cc: Daniel Vetter
    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

27 Aug, 2016

1 commit

  • Checking command line filenames that are outside the git tree can emit a
    noisy and confusing message.

    Quiet that message by redirecting stderr.
    Verify that the command was executed successfully.

    Fixes: 4cad35a7ca69 ("get_maintainer.pl: reduce need for command-line option -f")
    Link: http://lkml.kernel.org/r/1970a1d2fecb258e384e2e4fdaacdc9ccf3e30a4.1470955439.git.joe@perches.com
    Signed-off-by: Joe Perches
    Reported-by: Wolfram Sang
    Tested-by: Wolfram Sang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

11 Aug, 2016

1 commit

  • If get_maintainer is not given any filename arguments on the command line,
    the standard input is read for a patch.

    But checking if a VCS has a file named &STDIN is not a good idea and fails.

    Verify the nominal input file is not &STDIN before checking the VCS.

    Fixes: 4cad35a7ca69 ("get_maintainer.pl: reduce need for command-line option -f")
    Reported-by: Christopher Covington
    Signed-off-by: Joe Perches
    Signed-off-by: Linus Torvalds

    Joe Perches
     

03 Aug, 2016

1 commit


21 Jan, 2016

1 commit

  • The problem is that get_maintainer.pl doesn't work if you have a ./
    prefix on the filename. For example, if you type:

    ./scripts/get_maintainer.pl -f ./drivers/usb/usb-skeleton.c

    then the current code only includes LKML and people from the git log, it
    doesn't include Greg or the linux-usb list.

    Reported-by: Dan Carpenter
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

07 Nov, 2015

5 commits

  • Reviewer output currently does not include the subsystem
    that matched. Add it.

    Miscellanea:

    o Add a get_subsystem_name routine to centralize this

    Signed-off-by: Joe Perches
    Tested-by: Krzysztof Kozlowski
    Cc: Lee Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • We don't consistenly document the default value next to the option
    listing, but we do have a list of defaults here, so let's keep it up to
    date.

    Signed-off-by: Brian Norris
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian Norris
     
  • Many flag options are boolean and support both a positive and a negative
    invocation from the command line. Some of these are even mentioned by
    example (e.g., --nogit is mentioned as a default option), but they aren't
    explicitly mentioned in the list of options. It happens that some of
    these are pretty important, as they are default-on, and to turn them off,
    you have to know about the --no-foo version.

    Rather than clutter the whole help text with bracketed '--[no]foo', let's
    just mention the general rule, a la 'man gcc'.

    Signed-off-by: Brian Norris
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian Norris
     
  • Though it appears that Perl's GetOptions will take either, the latter is
    not documented in the options listing.

    Signed-off-by: Brian Norris
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian Norris
     
  • I really haven't used this option much myself, so feel free to improve on
    the documentation for it. I just noticed it while inspecting this script
    for undocumented features.

    Signed-off-by: Brian Norris
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian Norris
     

26 Jun, 2015

3 commits

  • Perl 5.22 emits a deprecated message when "\C" is used in a regex. Perl
    5.24 will disallow it altogether.

    Fix it by using [A-Z] instead of \C.

    Signed-off-by: Joe Perches
    Reported-by: Valdis Kletnieks
    Tested-by: Valdis Kletnieks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Section headers can be quite long and some are very long and duplicated
    for many initial characters.

    The current maximum length emitted for a section header is 20 bytes (or
    17 bytes then ... when the section header length is > 20).

    Change that length to 50 so more of the section is shown.

    Example new output:
    $ ./scripts/get_maintainer.pl -f drivers/net/ethernet/broadcom/bnx2x/
    Ariel Elior (supporter:BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER)
    netdev@vger.kernel.org (open list:BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER)
    linux-kernel@vger.kernel.org (open list)

    Old:
    $ ./scripts/get_maintainer.pl -f drivers/net/ethernet/broadcom/bnx2x/
    Ariel Elior (supporter:BROADCOM BNX2X 10...)
    netdev@vger.kernel.org (open list:BROADCOM BNX2X 10...)
    linux-kernel@vger.kernel.org (open list)

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Some people prefer not to be cc'd on patches. Add an ability to have a
    file (.get_maintainer.ignore) with names and email addresses that are
    excluded from being listed except when specifically listed as a maintainer
    in a section.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

09 Jul, 2014

1 commit


11 Feb, 2014

1 commit

  • Since git v1.7.7, the .git directory can be a file when, for example,
    the kernel is a submodule of another git super project. So, the check
    "-d .git" is not working anymore in this case. Using a more generic
    check like "-e .git" corrects this behaviour.

    Signed-off-by: Richard Genoud
    Cc: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Genoud
     

24 Jan, 2014

1 commit

  • get_maintainer currently uses "Signed-off-by" style lines to find
    interested parties to send patches to when the MAINTAINERS file does not
    have a specific section entry with a matching file pattern.

    Add statistics for commit authors and lines added and deleted to the
    information provided by --rolestats.

    These statistics are also emitted whenever --rolestats and --git are
    selected even when there is a specified maintainer.

    This can have the effect of expanding the number of people that are shown
    as possible "maintainers" of a particular file because "authors",
    "added_lines", and "removed_lines" are also used as criterion for the
    --max-maintainers option separate from the "commit_signers".

    The first "--git-max-maintainers" values of each criterion
    are emitted. Any "ties" are not shown.

    For example: (forcedeth does not have a named maintainer)

    Old output:

    $ ./scripts/get_maintainer.pl -f drivers/net/ethernet/nvidia/forcedeth.c
    "David S. Miller" (commit_signer:8/10=80%)
    Jiri Pirko (commit_signer:2/10=20%)
    Patrick McHardy (commit_signer:2/10=20%)
    Larry Finger (commit_signer:1/10=10%)
    Peter Zijlstra (commit_signer:1/10=10%)
    netdev@vger.kernel.org (open list:NETWORKING DRIVERS)
    linux-kernel@vger.kernel.org (open list)

    New output:

    $ ./scripts/get_maintainer.pl -f drivers/net/ethernet/nvidia/forcedeth.c
    "David S. Miller" (commit_signer:8/10=80%)
    Jiri Pirko (commit_signer:2/10=20%,authored:2/10=20%,removed_lines:3/33=9%)
    Patrick McHardy (commit_signer:2/10=20%,authored:2/10=20%,added_lines:12/95=13%,removed_lines:10/33=30%)
    Larry Finger (commit_signer:1/10=10%,authored:1/10=10%,added_lines:35/95=37%)
    Peter Zijlstra (commit_signer:1/10=10%)
    "Peter Hüwe" (authored:1/10=10%,removed_lines:15/33=45%)
    Joe Perches (authored:1/10=10%)
    Neil Horman (added_lines:40/95=42%)
    Bill Pemberton (removed_lines:3/33=9%)
    netdev@vger.kernel.org (open list:NETWORKING DRIVERS)
    linux-kernel@vger.kernel.org (open list)

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

30 Apr, 2013

1 commit

  • Create a new N: entry type in MAINTAINERS which performs a regex match
    against filenames; either those extracted from patch +++ or --- lines,
    or those specified on the command-line using the -f option.

    This provides the same benefits as using a K: regex option to match a
    set of filenames (see commit eb90d0855b75 "get_maintainer: allow
    keywords to match filenames"), but without the disadvantage that
    "random" file content, such as comments, will ever match the regex.
    Hence, revert most of that commit.

    Switch the Tegra entry from using K: to N:

    [akpm@linux-foundation.org: fix typo in docs, per Marcin]
    Reported-by: Marcin Slusarz
    Suggested-by: Joe Perches
    Signed-off-by: Stephen Warren
    Acked-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Warren
     

28 Feb, 2013

1 commit

  • Allow K: entries in MAINTAINERS to match directly against filenames;
    either those extracted from patch +++ or --- lines, or those specified
    on the command-line using the -f option.

    This potentially allows fewer lines in a MAINTAINERS entry, if all the
    relevant files are scattered throughout the whole kernel tree, yet
    contain some common keyword. An example would be using an ARM SoC name
    as the keyword to catch all related drivers.

    I don't think setting exact_pattern_match_hash would be appropriate
    here; at least for intended Tegra use case, this feature is to ensure
    that all Tegra-related driver changes get Cc'd to the Tegra mailing
    list. Setting exact_pattern_match_hash would prevent git history
    parsing for e.g. S-o-b tags, which still seems like it would be useful.
    Hence, this flag isn't set.

    Signed-off-by: Stephen Warren
    Acked-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Warren
     

22 Feb, 2013

1 commit

  • For removed files, get_maintainer.pl doesn't find any maintainers (besides
    the default linux-kernel@vger.kernel.org), as it only looks at the "+++"
    lines, which are "/dev/null" for removals. Fix this by extending the
    parsing to the "---" lines.

    E.g. for the two line test patch below the real score maintainers will now
    be found:

    --- a/arch/score/include/asm/dma-mapping.h
    +++ /dev/null

    Signed-off-by: Geert Uytterhoeven
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

21 Jun, 2012

1 commit


24 Mar, 2012

2 commits


11 Jan, 2012

1 commit

  • I happen to have had a commit to various network drivers since the big
    renaming/reorg which happened to drivers/net recently. This means that I
    now appear to be in the top few commit signers (by %age) for many of them
    so am getting sent all sorts of stuff and people who are involved with the
    driver are not. e.g. (to pick one at random):

    $ ./scripts/get_maintainer.pl -f drivers/net/ethernet/nvidia/forcedeth.c
    "David S. Miller" (commit_signer:5/7=71%)
    Ian Campbell (commit_signer:2/7=29%)
    Eric Dumazet (commit_signer:1/7=14%)
    Jeff Kirsher (commit_signer:1/7=14%)
    Jiri Pirko (commit_signer:1/7=14%)
    netdev@vger.kernel.org (open list:NETWORKING DRIVERS)
    linux-kernel@vger.kernel.org (open list)

    With the following patch the renames are followed and the result appears
    much more sensible:

    $ ./scripts/get_maintainer.pl -f drivers/net/ethernet/nvidia/forcedeth.c
    "David S. Miller" (commit_signer:31/34=91%)
    Joe Perches (commit_signer:11/34=32%)
    Szymon Janc (commit_signer:5/34=15%)
    Jiri Pirko (commit_signer:3/34=9%)
    Paul (commit_signer:2/34=6%)
    netdev@vger.kernel.org (open list:NETWORKING DRIVERS)
    linux-kernel@vger.kernel.org (open list)

    Signed-off-by: Ian Campbell
    Acked-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Campbell
     

26 Aug, 2011

1 commit


26 Jul, 2011

1 commit

  • Entries that used formats other than "Proper Name "
    were not parsed properly.

    Try to improve the parsing so that the entries in the forms of:
    Proper Name
    and
    Proper Name Commit Name
    are transformed correctly.

    Signed-off-by: Joe Perches
    Reviewed-by: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

23 Mar, 2011

1 commit

  • Extend the usage of the K section in the MAINTAINERS file to support
    matching regular expressions to any arbitrary text that may precede the
    patch itself. For example, the commit message or mail headers generated
    by git-format-patch.

    Signed-off-by: Joe Perches
    Original-patch-by: L. Alberto Giménez
    Acked-by: L. Alberto Giménez

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

14 Jan, 2011

2 commits

  • On Fri, 2010-11-05 at 13:50 -0700, Andrew Morton wrote:
    > z:/usr/src/git26> perl scripts/get_maintainer.pl -file mm/mempolicy.c
    > linux-mm@kvack.org
    > linux-kernel@vger.kernel.org

    Turns out this is an arguable defect in the script.

    The MAINTAINERS entry for mm is:

    MEMORY MANAGEMENT
    L: linux-mm@kvack.org
    W: http://www.linux-mm.org
    S: Maintained
    F: include/linux/mm.h
    F: mm/

    There's a maintainer entry, but no named individual, so the script doesn't
    use git history via --git-fallback.

    This is also a defect for MAINTAINERS with status entries marked "Orphan"
    or "Odd fixes".

    The script now checks a section for any "M:" entry and that an "S:" entry
    is supported or maintained. If both those conditions are not satisified,
    use --git-fallback as appropriate.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • This script now requires a user to add --norolestats to the command line
    so it's harder to feed the output of this script to programs that send
    mass emails.

    Update --help to correct command line defaults.

    Change version to 0.26.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

27 Oct, 2010

10 commits

  • Fix a defect with the first mailing list address being used for each
    subsequent mailing list.

    Updated to 0.26-beta6.

    Signed-off-by: Joe Perches
    Cc: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Use Florian Mickler's mailmap routine to reduce name duplication.

    o Add subroutine deduplicate_email to centralize code
    o Add hashes for deduplicate_(name|address)_hash
    o Remove now unused @interactive_to
    o Whitespace neatening
    o Add command line --help text
    o Add --mailmap command line option control
    o Interactive changes:
    - Add toggles for maintainer, git and list selections
    - Default selection is all
    - Add mailmap control

    Update to 0.26-beta5

    Signed-off-by: Joe Perches
    Cc: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • And a miscellaneous conversion of You to you in a help message

    Signed-off-by: Joe Perches
    Cc: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Implement it, like it is described in git-shortlog.

    Signed-off-by: Florian Mickler
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Mickler
     
  • Case insensitive name and email address matching can help reduce
    duplication when authors don't always use the exact same signature.

    o Add a --interactive per-file exact_match hash so git history
    can be checked on per-file only when there is no direct maintainer
    o Make @interactive_to list global so save_commits_by_ can check
    email names & addresses against this list for duplication
    o Don't allow --interactive and --sections
    o rename subroutine get_maintainer to get_maintainers
    o Added help text option to --interactive menu prompt

    Update version to 0.26-beta4

    Signed-off-by: Joe Perches
    Cc: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • o Added searching by git-blame as well as git-history
    o Added different selection toggles
    o Added ability to list commits by author or by sign-off-type
    o Use custom git and hg formats to make searching for subject/author
    a bit easier.
    o Move inlined section matching and searching git/hg history to
    new get_maintainer subroutine
    o Added subroutines save_commits_by_author and save_commits_by_signer
    o Removed subroutines vcs_get_shortlog and vcs_email_shortlog
    o Rename camelcase signaturePattern to signature_pattern

    Update to 0.26 beta3

    Signed-off-by: Joe Perches
    Cc: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • This is a first version of an interactive mode for
    scripts/get_maintainer.pl.

    It allows the user to interact with the script. Each cc candidate can be
    selected and deselected and a shortlog of authored commits can be
    displayed for each candidate.

    The menu is displayed via STDERR, the end result is outputted to STDOUT.
    This unusual mechanism allows using get_maintainer.pl in interactive mode
    via git send-email --cc-cmd.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Mickler
     
  • On Mon, 2010-09-13 at 00:01 -0400, Valdis.Kletnieks@vt.edu wrote:
    > Any chance of getting that to be ~/.get_maintainer.conf rather than
    > ./.get_maintainer.conf? I've just gotten bit like the 3rd or 4th time by
    > "oh but you didn't create that file in *this* tree"
    > (I usually have a linus git tree, a linux-next tree, and 3-4 -mm trees)

    Sure.

    Add a search path for the .conf file.

    3 paths are added:

    . customized per-tree configurations
    $HOME user global configuration when per-tree configs don't exist
    ./scripts lk defaults to override script

    Signed-off-by: Joe Perches
    Cc: Valdis Kletnieks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Adding commit signers when there is a listed MAINTAINER for a file
    can make the output list longer than necessary.

    Change the --git default from on to off.

    Add a new --git-fallback option (default on) used to add commit signers
    only when there is no MAINTAINER for a file.

    git history is used when --git-fallback is enabled and the pattern
    directory depth is not the same as the file directory depth.

    For instance:

    X86 ARCHITECTURE (32-BIT AND 64-BIT)
    M: Thomas Gleixner
    M: Ingo Molnar
    M: "H. Peter Anvin"
    M: x86@kernel.org
    T: git git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
    S: Maintained
    F: Documentation/x86/
    F: arch/x86/

    If using "./scripts/get_maintainer -f arch/x86/lib/atomic64_32.c", the pattern
    for "arch/x86/" does not match the directory depth of "arch/x86/lib"
    so the MAINTAINERS entries and git history is used to produce:

    $ ./scripts/get_maintainer.pl -f --rolestats arch/x86/lib/atomic64_32.c
    Thomas Gleixner (maintainer:X86 ARCHITECTURE...)
    Ingo Molnar (maintainer:X86 ARCHITECTURE...)
    "H. Peter Anvin" (maintainer:X86 ARCHITECTURE...,commit_signer:1/1=100%)
    x86@kernel.org (maintainer:X86 ARCHITECTURE...)
    Luca Barbieri (commit_signer:1/1=100%)
    linux-kernel@vger.kernel.org (open list)

    Luca Barbieri is added because he signed the only commit to
    arch/x86/lib/atomic64_32.c during the last year and he meets the
    other default qualifications.
    --git-min-percent (default:10)
    --git-min-signatures (default:1)

    If current users of ./scripts/get_maintainers.pl have scripts
    that use --nogit that expect git history to be excluded, those
    scripts should be updated to include --nogit-fallback or a
    .get_maintainer.conf file should be created with --nogit-fallback.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Keyword matching uses K: patterns from MAINTAINERS, so if looking for the
    MAINTAINERS maintainer, don't search MAINTAINERS for pattern matches.
    MAINTAINERS also has rather a lot of email addresses and is easily
    searched using grep "^M:", so skip it.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches