diff mbox series

scripts/get_maintainer.pl: don't print parentheses

Message ID 20231013091628.669415-1-manos.pitsidianakis@linaro.org (mailing list archive)
State New, archived
Headers show
Series scripts/get_maintainer.pl: don't print parentheses | expand

Commit Message

Manos Pitsidianakis Oct. 13, 2023, 9:16 a.m. UTC
When called from git-send-email, some results contain unclosed
parentheses from the subsystem title, for example:

    (cc-cmd) Adding cc: qemu-ppc@nongnu.org (open list:PowerNV (Non-Virt...) from: 'scripts/get_maintainer.pl --nogit-fallback'
    (cc-cmd) Adding cc: qemu-devel@nongnu.org (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: qemu-ppc@nongnu.org (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.

Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 scripts/get_maintainer.pl | 1 +
 1 file changed, 1 insertion(+)


base-commit: 63011373ad22c794a013da69663c03f1297a5c56

Comments

Philippe Mathieu-Daudé Oct. 13, 2023, 10:43 a.m. UTC | #1
On 13/10/23 11:16, Emmanouil Pitsidianakis wrote:
> When called from git-send-email, some results contain unclosed
> parentheses from the subsystem title, for example:
> 
>      (cc-cmd) Adding cc: qemu-ppc@nongnu.org (open list:PowerNV (Non-Virt...) from: 'scripts/get_maintainer.pl --nogit-fallback'
>      (cc-cmd) Adding cc: qemu-devel@nongnu.org (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: qemu-ppc@nongnu.org (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 =)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> This commit removes all parentheses from results.
> 
> Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
> ---
>   scripts/get_maintainer.pl | 1 +
>   1 file changed, 1 insertion(+)
Paolo Bonzini Oct. 13, 2023, 10:45 a.m. UTC | #2
Queued, thanks.

Paolo
diff mbox series

Patch

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 02fa828100..00a0870b26 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -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;