Re: [PATCH] send-email: fix uninitialized var warning for $smtp_auth
From: Eric Sunshine <hidden>
Date: 2016-06-15 23:06:37
On Fri, Sep 18, 2015 at 6:42 PM, Brian Norris [off-list ref] wrote:
On Fri, Sep 18, 2015 at 06:25:24PM -0400, Eric Sunshine wrote:quoted
Thanks, makes sense. I wonder if moving the check to the point where $smtp_auth is actually used (despite the noisier diff) would be cleaner,By moving the patch into the sub-subroutine (is this a lambda? I'm not too familiar with my perl), I think you change the order of the checks. So, previously, initial password auth would happen after the $smtp_auth format check. With your patch, it comes first. My patch: $ git send-email --smtp-auth="@" ... ... Send this email? ([y]es|[n]o|[q]uit|[a]ll): y invalid smtp auth: '@' at ./git-send-email.perl line 1140. Your patch: $ git send-email --smtp-auth="@" ... ... Send this email? ([y]es|[n]o|[q]uit|[a]ll): y Password for xxxx: invalid smtp auth: '@' at ./git-send-email.perl line 1155. Seems like the former is a little better, so you don't have to waste time with your password too many times.
Makes sense (again). Thanks for the explanation.