git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] send-email: fix uninitialized var warning for $smtp_auth

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Sep 18, 2015, 22:47 UTC
Message-ID
<CAPig+cR+W0Kt2y+vspS5dF6FHU=XLWZXJR46r7Rv4JP4gNiKTA@mail.gmail.com>
In-Reply-To
<20150918224242.GA45466@google.com>

On Fri, Sep 18, 2015 at 6:42 PM, Brian Norris <computersforpeace@gmail.com> wrote:

Show 26 quoted lines
> On Fri, Sep 18, 2015 at 06:25:24PM -0400, Eric Sunshine wrote:
>> 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.
Previous: Brian NorrisNext: Brian Norris
Message 4 of 6 in “send-email: fix uninitialized var warning for $smtp_auth”
  1. send-email: fix uninitialized var warning for $smtp_authBrian Norris, Sep 18, 2015
  2. Eric SunshineSep 18, 2015
  3. Brian NorrisSep 18, 2015
  4. Eric SunshineSep 18, 2015
  5. Brian NorrisSep 18, 2015
  6. Junio C HamanoSep 21, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.