Skip to contentSkip to conversation

scripts/get_maintainer.pl --help prints a warning

PATCH In review Paul Bolle 2 participants 3 messages Jun 13, 2012 GET_MAINTAINER script

lore
Share & tools
lore

Paul Bolle

author
#0 lore raw

0) "scripts/get_maintainer.pl --help" prints a warning (to stderr):
Use of uninitialized value $signature_pattern in concatenation (.) or string at scripts/get_maintainer.pl line 723.

1) That must be caused by line 732:

        or use only ${signature_pattern} signers (default: $email_git_all_signature_types)

2) "git blame -L 732,+1 scripts/get_maintainer.pl" points to commit 683c6f8fcbcb6de8d07545ba70aff49e50d8bcf2 ("scripts/get_maintainer.pl:
improve --interactive UI"). And a quick look at that commit suggests it introduced (most of) the current usage of $signature_pattern.

3) Would you have an idea how to silence that warning?

Paul Bolle

maintainer
#1 lore raw

PATCH 1/1 get_maintainer: Fix --help warning

Using --help emits a concatenation error.
Fix it.

---
 scripts/get_maintainer.pl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
scripts/get_maintainer.pl +2 -1
index 0948c6b..8b673dd 100755
@@ -83,6 +83,8 @@ push(@signature_tags, "Signed-off-by:");
 push(@signature_tags, "Reviewed-by:");
 push(@signature_tags, "Acked-by:");
 
+my $signature_pattern = "\(" . join("|", @signature_tags) . "\)";
+
 # rfc822 email address - preloaded methods go here.
 my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])";
 my $rfc822_char = '[\\000-\\377]';
@@ -473,7 +475,6 @@ my @subsystem = ();
 my @status = ();
 my %deduplicate_name_hash = ();
 my %deduplicate_address_hash = ();
-my $signature_pattern;
 
 my @maintainers = get_maintainers();