From 7768e27e1d3f3d5e253e795433033b5de1d1c157 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 19 Oct 2006 10:33:01 +0200 Subject: [PATCH] Don't use $author_name undefined when $from contains no /\serr new-file OK. Log says: Date: Thu, 19 Oct 2006 10:26:24 +0200 Sendmail: /usr/sbin/sendmail From: j Subject: Cc: To: k Result: OK $ cat err Use of uninitialized value in pattern match (m//) at /p/bin/git-send-email line 416. Use of uninitialized value in concatenation (.) or string at /p/bin/git-send-email line 420. Use of uninitialized value in concatenation (.) or string at /p/bin/git-send-email line 468. There's a patch for the $author_name part below. The example above shows that $subject may also be used uninitialized. That should be easy to fix, too. Signed-off-by: Jim Meyering Signed-off-by: Junio C Hamano --- git-send-email.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-send-email.perl b/git-send-email.perl index b17d261987..1c6d2cc787 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -412,7 +412,7 @@ sub send_message } my ($author_name) = ($from =~ /^(.*?)\s+