summaryrefslogtreecommitdiff
path: root/scripts/get_maintainer.pl
AgeCommit message (Collapse)Author
2017-08-08get_maintainer: Prepare for separate MAINTAINERS filesJoe Perches
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 <joe@perches.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-05-14scripts: Switch to more portable Perl shebangKamil Rytarowski
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 <n54@gmx.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-12-12get_maintainer: look for arbitrary letter prefixes in sectionsJoe Perches
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 <joe@perches.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Dave Airlie <airlied@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-08-26get_maintainer: quiet noisy implicit -f vcs_file_exists checkingJoe Perches
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 <joe@perches.com> Reported-by: Wolfram Sang <wsa@the-dreams.de> Tested-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-08-10get_maintainer: Don't check if STDIN exists in a VCS repositoryJoe Perches
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 <cov@codeaurora.org> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-08-02get_maintainer.pl: reduce need for command-line option -fJoe Perches
If a vcs is used, look to see if the vcs tracks the file specified and so the -f option becomes optional. Link: http://lkml.kernel.org/r/7c86a8df0d48770c45778a43b6b3e4627b2a90ee.1469746395.git.joe@perches.com Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-01-20scripts/get_maintainer.pl: handle file names beginning with ./Joe Perches
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 <dan.carpenter@oracle.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-06get_maintainer: add subsystem to reviewer outputJoe Perches
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 <joe@perches.com> Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Cc: Lee Jones <lee.jones@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-06get_maintainer: --r (list reviewer) is on by defaultBrian Norris
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 <computersforpeace@gmail.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-06get_maintainer: add --no-foo options to --helpBrian 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 <computersforpeace@gmail.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-06get_maintainer: it's '--pattern-depth', not '-pattern-depth'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 <computersforpeace@gmail.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-06get_maintainer: add missing documentation for --git-blame-signaturesBrian 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 <computersforpeace@gmail.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-06-25get_maintainer: fix perl 5.22/5.24 deprecated/incompatible "\C" useJoe Perches
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 <joe@perches.com> Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Tested-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-06-25get_maintainer: emit longer section headersJoe 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 <ariel.elior@qlogic.com> (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 <ariel.elior@qlogic.com> (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 <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-06-25get_maintainer.pl: add .get_maintainer.ignore file capabilityJoe 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 <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-07-08scripts: Teach get_maintainer.pl about the new "R:" tagJoe Perches
We can now designate reviewers in the MAINTAINERS file with the new "R:" tag, so this commit teaches get_maintainers.pl to add their email addresses. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2014-02-10get_maintainer: fix detection of git repositoryRichard Genoud
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 <richard.genoud@gmail.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-01-23get_maintainer: add commit author information to --rolestatsJoe Perches
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" <davem@davemloft.net> (commit_signer:8/10=80%) Jiri Pirko <jiri@resnulli.us> (commit_signer:2/10=20%) Patrick McHardy <kaber@trash.net> (commit_signer:2/10=20%) Larry Finger <Larry.Finger@lwfinger.net> (commit_signer:1/10=10%) Peter Zijlstra <peterz@infradead.org> (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" <davem@davemloft.net> (commit_signer:8/10=80%) Jiri Pirko <jiri@resnulli.us> (commit_signer:2/10=20%,authored:2/10=20%,removed_lines:3/33=9%) Patrick McHardy <kaber@trash.net> (commit_signer:2/10=20%,authored:2/10=20%,added_lines:12/95=13%,removed_lines:10/33=30%) Larry Finger <Larry.Finger@lwfinger.net> (commit_signer:1/10=10%,authored:1/10=10%,added_lines:35/95=37%) Peter Zijlstra <peterz@infradead.org> (commit_signer:1/10=10%) "Peter Hüwe" <PeterHuewe@gmx.de> (authored:1/10=10%,removed_lines:15/33=45%) Joe Perches <joe@perches.com> (authored:1/10=10%) Neil Horman <nhorman@tuxdriver.com> (added_lines:40/95=42%) Bill Pemberton <wfp5p@virginia.edu> (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 <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-29get_maintainer: use filename-only regex match for TegraStephen Warren
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 <marcin.slusarz@gmail.com> Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27get_maintainer: allow keywords to match filenamesStephen Warren
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 <swarren@nvidia.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21get_maintainer.pl: find maintainers for removed filesGeert Uytterhoeven
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 <geert@linux-m68k.org> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-20get_maintainer: Fix --help warningJoe Perches
Using --help emits a concatenation error. Fix it. Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Paul Bolle <pebolle@tiscali.nl> Tested-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23get_maintainer.pl: add support for moderated listsRichard Weinberger
Currently get_maintainer.pl reports moderated lists as open, which is just wrong. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23get_maintainer: use a default "unknown" S: status/roleJoe Perches
When an "S:" status line is unavailable, use a default "unknown" role. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10get_maintainers.pl: follow renames when looking up commit signersIan Campbell
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" <davem@davemloft.net> (commit_signer:5/7=71%) Ian Campbell <ian.campbell@citrix.com> (commit_signer:2/7=29%) Eric Dumazet <eric.dumazet@gmail.com> (commit_signer:1/7=14%) Jeff Kirsher <jeffrey.t.kirsher@intel.com> (commit_signer:1/7=14%) Jiri Pirko <jpirko@redhat.com> (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" <davem@davemloft.net> (commit_signer:31/34=91%) Joe Perches <joe@perches.com> (commit_signer:11/34=32%) Szymon Janc <szymon@janc.net.pl> (commit_signer:5/34=15%) Jiri Pirko <jpirko@redhat.com> (commit_signer:3/34=9%) Paul <paul.gortmaker@windriver.com> (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 <Ian.Campbell@citrix.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-25scripts/get_maintainer.pl: update Linus's git repositoryRalf Thielow
Change to new git tree - (git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git). Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-25get_maintainers.pl: improve .mailmap parsingJoe Perches
Entries that used formats other than "Proper Name <commit@email.xx>" were not parsed properly. Try to improve the parsing so that the entries in the forms of: Proper Name <proper@email.xx> <commit@email.xx> and Proper Name <proper@email.xx> Commit Name <commit@email.xx> are transformed correctly. Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Florian Mickler <florian@mickler.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22get_maintainer.pl: allow "K:" pattern tests to match non-patch textJoe Perches
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 <joe@perches.com> Original-patch-by: L. Alberto Giménez <agimenez@sysvalve.es> Acked-by: L. Alberto Giménez <agimenez@sysvalve.es> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-13scripts/get_maintainer.pl: use --git-fallback more oftenJoe Perches
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 <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-13scripts/get_maintainer.pl: make --rolestats the defaultJoe 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 <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: don't deduplicate unnamed addresses ie: mailing listsJoe Perches
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 <joe@perches.com> Cc: Florian Mickler <florian@mickler.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: use mailmap in name deduplication and other updatesJoe 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 <joe@perches.com> Cc: Florian Mickler <florian@mickler.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: correct indentation in a few placesJoe Perches
And a miscellaneous conversion of You to you in a help message Signed-off-by: Joe Perches <joe@perches.com> Cc: Florian Mickler <florian@mickler.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: fix mailmap handlingFlorian Mickler
Implement it, like it is described in git-shortlog. Signed-off-by: Florian Mickler <florian@mickler.org> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: use case insensitive name de-duplicationJoe Perches
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_<foo> 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 <joe@perches.com> Cc: Florian Mickler <florian@mickler.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: improve --interactive UIJoe 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 <joe@perches.com> Cc: Florian Mickler <florian@mickler.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: add interactive modeFlorian Mickler
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 <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: use .get_maintainer.conf from . then $HOME then ↵Joe Perches
scripts 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 <joe@perches.com> Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: add default --git-fallback, remove default --gitJoe 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 <tglx@linutronix.de> M: Ingo Molnar <mingo@redhat.com> M: "H. Peter Anvin" <hpa@zytor.com> 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 <tglx@linutronix.de> (maintainer:X86 ARCHITECTURE...) Ingo Molnar <mingo@redhat.com> (maintainer:X86 ARCHITECTURE...) "H. Peter Anvin" <hpa@zytor.com> (maintainer:X86 ARCHITECTURE...,commit_signer:1/1=100%) x86@kernel.org (maintainer:X86 ARCHITECTURE...) Luca Barbieri <luca@luca-barbieri.com> (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 <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: don't search MAINTAINERS for keywords or emailsJoe 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 <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: use correct indentationJoe Perches
Fix an overly indented block. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26scripts/get_maintainer.pl: Add --git-blame --rolestats "Authored lines" ↵Joe Perches
information When options --git-blame and --rolestats are specified, add the maintainers with the qualifying --git-min-percent amount of lines authored of the complete file. Does not add more authors than specified by --git-max-maintainers. For anyone using hg, this option works but is _very_ slow. It's orders of magnitude slower than git slow. The get_maintainer.pl version was incremented to 0.25. This can be used with or without --git. For instance: $ ./scripts/get_maintainer.pl --git-blame --nogit --rolestats -f lib/bitmap.c Paul Jackson <pj@sgi.com> (authored lines:406/613=66%,commits:7/20=35%) Akinobu Mita <mita@miraclelinux.com> (authored lines:87/613=14%,commits:3/20=15%) Reinette Chatre <reinette.chatre@linux.intel.com> (authored lines:42/613=7%) Andrew Morton <akpm@linux-foundation.org> (commits:16/20=80%) Paul Mundt <lethal@linux-sh.org> (commits:3/20=15%) Randy Dunlap <randy.dunlap@oracle.com> (commits:2/20=10%) $ ./scripts/get_maintainer.pl --git-blame --git --rolestats -f lib/bitmap.c Andrew Morton <akpm@linux-foundation.org> (commit_signer:4/5=80%,commits:16/20=80%) Akinobu Mita <akinobu.mita@gmail.com> (commit_signer:2/5=40%,authored lines:87/613=14%,commits:3/20=15%) Jack Steiner <steiner@sgi.com> (commit_signer:1/5=20%) Ben Hutchings <ben@decadent.org.uk> (commit_signer:1/5=20%) Lee Schermerhorn <lee.schermerhorn@hp.com> (commit_signer:1/5=20%) Paul Jackson <pj@sgi.com> (authored lines:406/613=66%,commits:7/20=35%) Reinette Chatre <reinette.chatre@linux.intel.com> (authored lines:42/613=7%) Paul Mundt <lethal@linux-sh.org> (commits:3/20=15%) Randy Dunlap <randy.dunlap@oracle.com> (commits:2/20=10%) linux-kernel@vger.kernel.org (open list) Signed-off-by: Joe Perches <joe@perches.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25scripts/get_maintainer.pl: default to not include unspecified tagsFlorian Mickler
This changes the default of the option --git-all-signature-types to be disabled by default. The effect being, that only certain (currently Signed-Off-By:, Acked-by: and Reviewed-By:) tags are used to get adresses of potential maintainers. Motivated is this change by the desire to not 'spam' people unnecessary: A Tested-By or a Reported-By is not ment as a hint that those people want to/are able to review patches to the code in question. In a quest to find resilient statistics for this i came up with this: I produced a list of all the tag-signers not already covered with a signed-off/acked/reviewed tag somewhere in the last year of git history. Those were 650 addresses of "assumed non-developers". And to check if those "assumed non-developers" are professional testers/reporters worth cc'ing, i then counted their total appearences in the git log: 469 were mentioned only once. 123 were mentioned twice. 38 three times 8 four times 5 six times 5 five times 1 eight times 1 fourteen times I believe this supports my thesis, that the ''non-maintainer-tags'' are not actively useful for patch-review. (except probably the guy mentioned fourteen times...) But of course one could also find arguments to poke holes in this statistics, for example does this statistic not include code-locality: A tested-by on a patch that touches some specific piece of code can be more worth than a signed-off in another part of the tree. But... let's play it safe and let's err on the "safe" side meaning to not spam those people when in doubt. We already have the signed-off's and Maintainers file. So this should be ok. And if need be, the maintainers can always forward the patch. [i probably could make a diploma thesis out of this changelog :)] Signed-off-by: Florian Mickler <florian@mickler.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Joe Perches <joe@perches.com> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25scripts/get_maintainer.pl: add .get_maintainer.conf default options fileJoe Perches
Allow the use of a .get_maintainer.conf file to control the default options applied when scripts/get_maintainer.pl is run. .get_maintainer.conf can contain any valid command-line argument. File contents are prepended to any additional command line arguments. Multiple lines may be used, blank lines ignored, # is a comment. Updated scripts/get_maintainer.pl version to 0.24 Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Florian Mickler <florian@mickler.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25scripts/get_maintainer.pl: optionally ignore non-maintainer signaturesJoe Perches
When using --git to determine who to send a patch to, get_maintainers will currently include all signatures. This can include signers that simply report an issue or test a patch. Signers that use this tag are not necessarily good candidates to review new patches. This patch allows get_maintainers to optionally restrict output to only signatures that use Signed-off-by:, Acked-by:, or Reviewed-by:. Signed-off-by: is included because those are people who are responsible for the code. Acked-by: is questionable, but as signers that use this tag tend to be active linux gatekeepers, false positives are tolerable. Reviewed-by: is included because signers responsible for the code thought that the review feedback for a changeset by that signer was valuable. This patch has been modified from Florian's original submission to change the supported signature types to the canonical forms and use slightly different spacing. A couple of spacing issues were also corrected in the original source. The command line argument was also renamed. Original-patch-by: Florian Mickler <florian@mickler.org> Signed-off-by: Florian Mickler <florian@mickler.org> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-24get_maintainer: repair STDIN usageWolfram Sang
Commit 22dd5b0cba50a197aaa3bd2790a29ee2e8e4e372 (fix perlcritic warnings) broke the ability to handle STDIN because the three argument version of open() cannot handle standard IO-streams (which is mentioned in PerlBestPractices, too). Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06scripts/get_maintainer.pl: fix possible infinite loopJoe Perches
If MAINTAINERS section entries are misformatted, it was possible to have an infinite loop. Correct the defect by always moving the index to the end of section + 1 Also, exit check for exclude as soon as possible. Signed-off-by: Joe Perches <joe@perches.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06get_maintainer: quote email address with periodStephen Hemminger
Picky mail systems won't accept email addresses where recipient has period in name; ie. David S. Miller <davemloft.net> will not work. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06get_maintainer: fix perlcritic warningsStephen Hemminger
perlcritic is a standard checker for Perl Best Practices. This patch fixes most of the warnings in the get_maintainer script. If kernel programmers are going to have checkpatch they should write clean scripts as well... Bareword file handle opened at line 176, column 1. See pages 202,204 of PBP. (Severity: 5) Two-argument "open" used at line 176, column 1. See page 207 of PBP. (Severity: 5) Bareword file handle opened at line 207, column 5. See pages 202,204 of PBP. (Severity: 5) Two-argument "open" used at line 207, column 5. See page 207 of PBP. (Severity: 5) Bareword file handle opened at line 246, column 6. See pages 202,204 of PBP. (Severity: 5) Two-argument "open" used at line 246, column 6. See page 207 of PBP. (Severity: 5) Bareword file handle opened at line 258, column 2. See pages 202,204 of PBP. (Severity: 5) Two-argument "open" used at line 258, column 2. See page 207 of PBP. (Severity: 5) Expression form of "eval" at line 983, column 17. See page 161 of PBP. (Severity: 5) Expression form of "eval" at line 985, column 17. See page 161 of PBP. (Severity: 5) Subroutine prototypes used at line 1186, column 1. See page 194 of PBP. (Severity: 5) Subroutine prototypes used at line 1206, column 1. See page 194 of PBP. (Severity: 5) Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06scripts/get_maintainer.pl: add ability to read from STDINJoe Perches
Doesn't need or accept '-' as a trailing option to read stdin. Doesn't print usage() after bad options. Adds --usage as command line equivalent of --help Suggested-by: Borislav Petkov <petkovbb@googlemail.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>