Skip to contentSkip to conversation

scripts/get_maintainer.pl: don't print parentheses

PATCH Applied Emmanouil Pitsidianakis 3 participants 3 messages Oct 13, 2023 GET_MAINTAINER script

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/get_maintainer.pl: don't print parentheses

When called from git-send-email, some results contain unclosed parentheses from the subsystem title, for example:

    (cc-cmd) Adding cc: [email protected] (open list:PowerNV (Non-Virt...) from: 'scripts/get_maintainer.pl --nogit-fallback'
    (cc-cmd) Adding cc: [email protected] (open list:All patches CC here) from: 'scripts/get_maintainer.pl --nogit-fallback'
    Unmatched () '(open list:PowerNV (Non-Virt...)' '' at /usr/lib/git-core/git-send-email line 642.
    error: unable to extract a valid address from: [email protected] (open list:PowerNV (Non-Virt...)
    What to do with this address? ([q]uit|[d]rop|[e]dit): d

This commit removes all parentheses from results.

---
 scripts/get_maintainer.pl | 1 +
 1 file changed, 1 insertion(+)
scripts/get_maintainer.pl +1 -0
index 02fa828100..00a0870b26 100755
@@ -907,6 +907,7 @@ sub get_subsystem_name {
     if (length($subsystem) > 20) {
 	$subsystem = substr($subsystem, 0, 17);
 	$subsystem =~ s/\s*$//;
+	$subsystem =~ s/[()]//g;
 	$subsystem = $subsystem . "...";
     }
     return $subsystem;

base-commit: 63011373ad22c794a013da69663c03f1297a5c56

Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Emmanouil Pitsidianakis

When called from git-send-email, some results contain unclosed parentheses from the subsystem title, for example:

     (cc-cmd) Adding cc: [email protected] (open list:PowerNV (Non-Virt...) from: 'scripts/get_maintainer.pl --nogit-fallback'
     (cc-cmd) Adding cc: [email protected] (open list:All patches CC here) from: 'scripts/get_maintainer.pl --nogit-fallback'
     Unmatched () '(open list:PowerNV (Non-Virt...)' '' at /usr/lib/git-core/git-send-email line 642.
     error: unable to extract a valid address from: [email protected] (open list:PowerNV (Non-Virt...)
     What to do with this address? ([q]uit|[d]rop|[e]dit): d

Eh thanks, this bugged me various times =)

Quoted 6 lines

This commit removes all parentheses from results.

---
  scripts/get_maintainer.pl | 1 +
  1 file changed, 1 insertion(+)