{"thread":{"id":"12210","subject":"[PATCH] send-email: squelch warning due to comparing undefined $_ to \"\"","startedAt":"2008-02-20T05:55:07Z","lastAt":"2008-02-20T18:37:29Z","messageCount":2,"participants":["Jay Soffian","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"69360","messageId":"1203486907-12304-1-git-send-email-jaysoffian@gmail.com","threadId":"12210","inReplyTo":null,"subject":"[PATCH] send-email: squelch warning due to comparing undefined $_ to \"\"","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2008-02-20T05:55:07Z","receivedAt":"2008-02-20T05:55:07Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"The check to see if initial_reply_to is defined was also comparing $_ to\n\"\" for a reason I cannot ascertain (looking at the commit which made the\nchange didn't provide enlightenment), but if $_ is undefined, perl\ngenerates a warning.\n\nSigned-off-by: Jay Soffian <jaysoffian@gmail.com>\n---\nJunio, the commit which introduced the change was yours, but I don't\nsee why you were comparing $_ to \"\". \n\nhttp://repo.or.cz/w/git.git?a=commit;h=ace9c2a9dd7c9e54194998fc6b7c677dbb7d0902\n\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 59601e3..ccb87a2 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -475,7 +475,7 @@ if ($thread && !defined $initial_reply_to && $prompting) {\n \n \t$initial_reply_to = $_;\n }\n-if (defined $initial_reply_to && $_ ne \"\") {\n+if (defined $initial_reply_to) {\n \t$initial_reply_to =~ s/^\\s*<?/</;\n \t$initial_reply_to =~ s/>?\\s*$/>/;\n }\n-- \n1.5.4.2.208.gfb302\n"},{"id":"69390","messageId":"7vmypv5v9y.fsf@gitster.siamese.dyndns.org","threadId":"12210","inReplyTo":"1203486907-12304-1-git-send-email-jaysoffian@gmail.com","subject":"Re: [PATCH] send-email: squelch warning due to comparing undefined $_ to \"\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-20T18:37:29Z","receivedAt":"2008-02-20T18:37:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jay Soffian <jaysoffian@gmail.com> writes:\n\n> The check to see if initial_reply_to is defined was also comparing $_ to\n> \"\" for a reason I cannot ascertain (looking at the commit which made the\n> change didn't provide enlightenment), but if $_ is undefined, perl\n> generates a warning.\n>\n> Signed-off-by: Jay Soffian <jaysoffian@gmail.com>\n> ---\n> Junio, the commit which introduced the change was yours, but I don't\n> see why you were comparing $_ to \"\". \n\nI think it was meant to check for $initial_reply_to being empty\n(i.e. not compare $_ but the variable), but even if that is the\ncase I do not think the check would make a difference.\n\nSo the patch looks good.  Thanks.\n"}]}