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

Re: [PATCH] send-email: squelch warning due to comparing undefined $_ to ""

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 20, 2008, 18:37 UTC
Message-ID
<7vmypv5v9y.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1203486907-12304-1-git-send-email-jaysoffian@gmail.com>
Jay Soffian <jaysoffian@gmail.com> writes:
Show 9 quoted lines
> The check to see if initial_reply_to is defined was also comparing $_ to
> "" for a reason I cannot ascertain (looking at the commit which made the
> change didn't provide enlightenment), but if $_ is undefined, perl
> generates a warning.
>
> Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
> ---
> Junio, the commit which introduced the change was yours, but I don't
> see why you were comparing $_ to "". 

I think it was meant to check for $initial_reply_to being empty (i.e. not compare $_ but the variable), but even if that is the case I do not think the check would make a difference.

So the patch looks good.  Thanks.
Previous: Jay Soffian
Message 2 of 2 in “send-email: squelch warning due to comparing undefined $_ to ""”
  1. send-email: squelch warning due to comparing undefined $_ to ""Jay Soffian, Feb 20, 2008
  2. Junio C HamanoFeb 20, 2008

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.