Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parse-maintainers: Do not sort section content by default

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

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Joe Perches and committed by
Linus Torvalds
5cdbec10 9420e8ad

+27 -4
+27 -4
scripts/parse-maintainers.pl
··· 8 8 my $output_file = "MAINTAINERS.new"; 9 9 my $output_section = "SECTION.new"; 10 10 my $help = 0; 11 - 11 + my $order = 0; 12 12 my $P = $0; 13 13 14 14 if (!GetOptions( 15 15 'input=s' => \$input_file, 16 16 'output=s' => \$output_file, 17 17 'section=s' => \$output_section, 18 + 'order!' => \$order, 18 19 'h|help|usage' => \$help, 19 20 )) { 20 21 die "$P: invalid argument - use --help if necessary\n"; ··· 33 32 --input => MAINTAINERS file to read (default: MAINTAINERS) 34 33 --output => sorted MAINTAINERS file to write (default: MAINTAINERS.new) 35 34 --section => new sorted MAINTAINERS file to write to (default: SECTION.new) 35 + --order => Use the preferred section content output ordering (default: 0) 36 + Preferred ordering of section output is: 37 + M: Person acting as a maintainer 38 + R: Person acting as a patch reviewer 39 + L: Mailing list where patches should be sent 40 + S: Maintenance status 41 + W: URI for general information 42 + Q: URI for patchwork tracking 43 + B: URI for bug tracking/submission 44 + C: URI for chat 45 + P: URI or file for subsystem specific coding styles 46 + T: SCM tree type and location 47 + F: File and directory pattern 48 + X: File and directory exclusion pattern 49 + N: File glob 50 + K: Keyword - patch content regex 36 51 37 52 If <pattern match regexes> exist, then the sections that match the 38 53 regexes are not written to the output file but are written to the ··· 73 56 74 57 sub by_pattern($$) { 75 58 my ($a, $b) = @_; 76 - my $preferred_order = 'MRPLSWTQBCFXNK'; 59 + my $preferred_order = 'MRLSWQBCPTFXNK'; 77 60 78 61 my $a1 = uc(substr($a, 0, 1)); 79 62 my $b1 = uc(substr($b, 0, 1)); ··· 122 105 print $file $separator; 123 106 } 124 107 print $file $key . "\n"; 125 - foreach my $pattern (sort by_pattern split('\n', %$hashref{$key})) { 126 - print $file ($pattern . "\n"); 108 + if ($order) { 109 + foreach my $pattern (sort by_pattern split('\n', %$hashref{$key})) { 110 + print $file ($pattern . "\n"); 111 + } 112 + } else { 113 + foreach my $pattern (split('\n', %$hashref{$key})) { 114 + print $file ($pattern . "\n"); 115 + } 127 116 } 128 117 } 129 118 }