From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Ramkumar Ramachandra <artagnon@gmail.com>
Subject: [PATCH 2/3] send-email: drop misleading function prototype
Date: Sun, 31 Mar 2013 18:40:41 -0700 [thread overview]
Message-ID: <1364780442-6015-2-git-send-email-gitster@pobox.com> (raw)
In-Reply-To: <1364780442-6015-1-git-send-email-gitster@pobox.com>
From: Ramkumar Ramachandra <artagnon@gmail.com>
The subroutine check_file_rev_conflict() is called from two places,
both of which expects to pass a single scaler variable and see if
that can be interpreted as a pathname or a revision name. It is
defined with a function prototype ($) to force a scaler context
while evaluating the arguments at the calling site but it does not
help the current calling sites. The only effect it has is to hurt
future calling sites that may want to build an argument list in an
array variable and call it as check_file_rev_confict(@args).
Drop the misleading prototype, as Perlcritic suggests.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
git-send-email.perl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 79cc5be..86dd593 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -513,7 +513,7 @@ sub split_addrs {
($sender) = expand_aliases($sender) if defined $sender;
# returns 1 if the conflict must be solved using it as a format-patch argument
-sub check_file_rev_conflict($) {
+sub check_file_rev_conflict {
return unless $repo;
my $f = shift;
try {
--
1.8.2-441-g6e6f07b
next prev parent reply other threads:[~2013-04-01 1:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 12:39 [PATCH] git-send-email.perl: implement suggestions made by perlcritic Ramkumar Ramachandra
2013-03-21 15:29 ` Junio C Hamano
2013-03-21 16:51 ` Ramkumar Ramachandra
2013-03-27 17:13 ` Ramkumar Ramachandra
2013-03-27 17:38 ` Junio C Hamano
2013-03-28 12:47 ` [PATCH v2] " Ramkumar Ramachandra
2013-03-28 18:57 ` Jonathan Nieder
2013-03-28 20:26 ` Junio C Hamano
2013-03-31 20:59 ` Ramkumar Ramachandra
2013-04-01 1:39 ` Junio C Hamano
2013-04-01 1:40 ` [PATCH 1/3] send-email: use "return;" not "return undef;" on error codepaths Junio C Hamano
2013-04-01 1:40 ` Junio C Hamano [this message]
2013-04-01 2:20 ` [PATCH 2/3] send-email: drop misleading function prototype Jonathan Nieder
2013-04-01 4:09 ` Eric Sunshine
2013-04-01 1:40 ` [PATCH 3/3] send-email: use the three-arg form of open in recipients_cmd Junio C Hamano
2013-04-01 2:30 ` Jonathan Nieder
2013-04-02 7:46 ` Ramkumar Ramachandra
2013-04-01 4:08 ` [PATCH 1/3] send-email: use "return;" not "return undef;" on error codepaths Eric Sunshine
2013-04-02 7:59 ` Ramkumar Ramachandra
2013-04-02 14:49 ` Junio C Hamano
2013-04-02 7:41 ` [PATCH v2] git-send-email.perl: implement suggestions made by perlcritic Ramkumar Ramachandra
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=1364780442-6015-2-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
/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).