From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0862C2D0ED for ; Thu, 26 Mar 2020 16:47:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AB5292073E for ; Thu, 26 Mar 2020 16:47:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727502AbgCZQru (ORCPT ); Thu, 26 Mar 2020 12:47:50 -0400 Received: from smtprelay0003.hostedemail.com ([216.40.44.3]:41814 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726267AbgCZQru (ORCPT ); Thu, 26 Mar 2020 12:47:50 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id 1BFC818029121; Thu, 26 Mar 2020 16:47:48 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: moon13_26d3129e62d05 X-Filterd-Recvd-Size: 4910 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA; Thu, 26 Mar 2020 16:47:46 +0000 (UTC) Message-ID: <00d11cf766237d9c12c2a06458962c4bae84fa78.camel@perches.com> Subject: Re: [PATCH] parse-maintainers: Do not sort section content by default From: Joe Perches To: Mauro Carvalho Chehab , Lukas Bulwahn , Linus Torvalds Cc: Jonathan Corbet , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 26 Mar 2020 09:45:55 -0700 In-Reply-To: <4d5291fa3fb4962b1fa55e8fd9ef421ef0c1b1e5.camel@perches.com> References: <20200304072950.10532-1-lukas.bulwahn@gmail.com> <20200304131035.731a3947@lwn.net> <20200307110154.719572e4@onda.lan> <0d5503e1d864f2588e756ae590ff8935e11bf9d6.camel@perches.com> <4d5291fa3fb4962b1fa55e8fd9ef421ef0c1b1e5.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Sat, 2020-03-07 at 18:59 -0800, Joe Perches wrote: > Add an --order switch to control section reordering. > Default for --order is off. > Change the default ordering to a slightly more sensible: > > M: Person acting as a maintainer > R: Person acting as a patch reviewer > L: Mailing list where patches should be sent > S: Maintenance status > W: URI for general information > Q: URI for patchwork tracking > B: URI for bug tracking/submission > C: URI for chat > P: URI or file for subsystem specific coding styles > T: SCM tree type and location > F: File and directory pattern > X: File and directory exclusion pattern > N: File glob > K: Keyword - patch content regex Linus? ping? > Signed-off-by: Joe Perches > --- > scripts/parse-maintainers.pl | 31 +++++++++++++++++++++++++++---- > 1 file changed, 27 insertions(+), 4 deletions(-) > > diff --git a/scripts/parse-maintainers.pl b/scripts/parse-maintainers.pl > index 255cef1..2ca4eb3 100644 > --- a/scripts/parse-maintainers.pl > +++ b/scripts/parse-maintainers.pl > @@ -8,13 +8,14 @@ my $input_file = "MAINTAINERS"; > my $output_file = "MAINTAINERS.new"; > my $output_section = "SECTION.new"; > my $help = 0; > - > +my $order = 0; > my $P = $0; > > if (!GetOptions( > 'input=s' => \$input_file, > 'output=s' => \$output_file, > 'section=s' => \$output_section, > + 'order!' => \$order, > 'h|help|usage' => \$help, > )) { > die "$P: invalid argument - use --help if necessary\n"; > @@ -32,6 +33,22 @@ usage: $P [options] > --input => MAINTAINERS file to read (default: MAINTAINERS) > --output => sorted MAINTAINERS file to write (default: MAINTAINERS.new) > --section => new sorted MAINTAINERS file to write to (default: SECTION.new) > + --order => Use the preferred section content output ordering (default: 0) > + Preferred ordering of section output is: > + M: Person acting as a maintainer > + R: Person acting as a patch reviewer > + L: Mailing list where patches should be sent > + S: Maintenance status > + W: URI for general information > + Q: URI for patchwork tracking > + B: URI for bug tracking/submission > + C: URI for chat > + P: URI or file for subsystem specific coding styles > + T: SCM tree type and location > + F: File and directory pattern > + X: File and directory exclusion pattern > + N: File glob > + K: Keyword - patch content regex > > If exist, then the sections that match the > regexes are not written to the output file but are written to the > @@ -56,7 +73,7 @@ sub by_category($$) { > > sub by_pattern($$) { > my ($a, $b) = @_; > - my $preferred_order = 'MRPLSWTQBCFXNK'; > + my $preferred_order = 'MRLSWQBCPTFXNK'; > > my $a1 = uc(substr($a, 0, 1)); > my $b1 = uc(substr($b, 0, 1)); > @@ -105,8 +122,14 @@ sub alpha_output { > print $file $separator; > } > print $file $key . "\n"; > - foreach my $pattern (sort by_pattern split('\n', %$hashref{$key})) { > - print $file ($pattern . "\n"); > + if ($order) { > + foreach my $pattern (sort by_pattern split('\n', %$hashref{$key})) { > + print $file ($pattern . "\n"); > + } > + } else { > + foreach my $pattern (split('\n', %$hashref{$key})) { > + print $file ($pattern . "\n"); > + } > } > } > } >