From: Jay Soffian <jaysoffian@gmail.com>
To: git@vger.kernel.org
Cc: Jay Soffian <jaysoffian@gmail.com>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] send-email: squelch warning due to comparing undefined $_ to ""
Date: Wed, 20 Feb 2008 00:55:07 -0500 [thread overview]
Message-ID: <1203486907-12304-1-git-send-email-jaysoffian@gmail.com> (raw)
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 "".
http://repo.or.cz/w/git.git?a=commit;h=ace9c2a9dd7c9e54194998fc6b7c677dbb7d0902
git-send-email.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 59601e3..ccb87a2 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -475,7 +475,7 @@ if ($thread && !defined $initial_reply_to && $prompting) {
$initial_reply_to = $_;
}
-if (defined $initial_reply_to && $_ ne "") {
+if (defined $initial_reply_to) {
$initial_reply_to =~ s/^\s*<?/</;
$initial_reply_to =~ s/>?\s*$/>/;
}
--
1.5.4.2.208.gfb302
next reply other threads:[~2008-02-20 5:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-20 5:55 Jay Soffian [this message]
2008-02-20 18:37 ` [PATCH] send-email: squelch warning due to comparing undefined $_ to "" Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1203486907-12304-1-git-send-email-jaysoffian@gmail.com \
--to=jaysoffian@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).