]> Gentwo Git Trees - linux/.git/commitdiff
get_maintainer: add --substatus for reporting subsystem status - fix
authorVlastimil Babka <vbabka@suse.cz>
Tue, 11 Feb 2025 15:16:11 +0000 (16:16 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 23 Feb 2025 06:26:13 +0000 (22:26 -0800)
The automatically enabled --substatus can break existing scripts that do
not disable --rolestats.  Require that script output goes to a terminal to
enable it automatically.

Link: https://lkml.kernel.org/r/66c2bf7a-9119-4850-b6b8-ac8f426966e1@suse.cz
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Joe Perches <joe@perches.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Ted Ts'o <tytso@mit.edu>
Cc: Thorsten Leemhuis <linux@leemhuis.info>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/get_maintainer.pl

index da7fc70f17cd8d46b45da8db0b2029bb11b25af1..3eb922b4d22c0114b204a93736ee342f57a718cb 100755 (executable)
@@ -317,7 +317,7 @@ $output_rolestats = 1 if ($interactive);
 $output_roles = 1 if ($output_rolestats);
 
 if (!defined $output_substatus) {
-    $output_substatus = $email && $output_roles;
+    $output_substatus = $email && $output_roles && -t STDOUT;
 }
 
 if ($sections || $letters ne "") {
@@ -1086,7 +1086,7 @@ MAINTAINER field selection options:
     --remove-duplicates => minimize duplicate email names/addresses
     --roles => show roles (status:subsystem, git-signer, list, etc...)
     --rolestats => show roles and statistics (commits/total_commits, %)
-    --substatus => show subsystem status if not Maintained (default: match --roles)"
+    --substatus => show subsystem status if not Maintained (default: match --roles when output is tty)"
     --file-emails => add email addresses found in -f file (default: 0 (off))
     --fixes => for patches, add signatures of commits with 'Fixes: <commit>' (default: 1 (on))
   --scm => print SCM tree(s) if any