Skip to contentSkip to conversation

get_maintainer: strip long text in brackets from mail description

PATCH In review Costa Shulyupin 2 participants 2 messages Jul 25, 2023 GET_MAINTAINER script

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 get_maintainer: strip long text in brackets from mail description

assuming this text is optional,
because truncated bracket causes error of git send-email:

git send-email --to-cmd=get_maintainer.pl ....
Unmatched () '(open list:CXLFLASH (IBM Coherent Accelerator Processor In...)' '' at /usr/libexec/git-core/git-send-email line 652.
error: unable to extract a valid address from: [email protected] (open list:CXLFLASH (IBM Coherent Accelerator Processor In...)

---
 scripts/get_maintainer.pl | 1 +
 1 file changed, 1 insertion(+)
scripts/get_maintainer.pl +1 -0
index ab123b498fd9..8319694a9c2f 100755
@@ -1252,6 +1252,7 @@ sub get_subsystem_name {
     my $start = find_starting_index($index);
 
     my $subsystem = $typevalue[$start];
+    $subsystem =~ s/\(....*\)\s*//;
     if ($output_section_maxlen && length($subsystem) > $output_section_maxlen) {
 	$subsystem = substr($subsystem, 0, $output_section_maxlen - 3);
 	$subsystem =~ s/\s*$//;
Signature · 1 line
2.41.0
maintainer
#1 lore raw
Quoted 6 lines · Costa Shulyupin

assuming this text is optional,
because truncated bracket causes error of git send-email:

git send-email --to-cmd=get_maintainer.pl ....
Unmatched () '(open list:CXLFLASH (IBM Coherent Accelerator Processor In...)' '' at /usr/libexec/git-core/git-send-email line 652.
error: unable to extract a valid address from: [email protected] (open list:CXLFLASH (IBM Coherent Accelerator Processor In...)

Add --norolestats to your invocation instead