git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Marc Kleine-Budde" <m.kleine-budde@pengutronix.de>,
	"Jay Soffian" <jaysoffian@gmail.com>
Subject: Re: [PATCH] send-email: do not check for editor until needed
Date: Tue, 23 Mar 2010 14:25:57 -0500	[thread overview]
Message-ID: <20100323192557.GA1511@progeny.tock> (raw)
In-Reply-To: <A612847CFE53224C91B23E3A5B48BAC73EC0B01EE8@xmail3.se.axis.com>

Peter Kjellerstedt wrote:

> Shouldn't that be:
> 
> 	if ($#_ == -1) {
> 		return;
> 	}
> 
> or more readable:
> 
> 	return if (!@_);

Probably. :)

> as I assume you are trying to protect do_edit() from being called 
> without arguments?

I tested out Michael J Gruber’s simpler patch and it both makes sense
and works fine, so I’d suggest going with it instead.

Still, thanks for the comments.  It is good to know what I need to
learn.

Regards,
Jonathan

      reply	other threads:[~2010-03-23 19:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 14:59 [REGRESSION] git var GIT_EDITOR fails without tty Uwe Kleine-König
2010-03-22 16:12 ` [PATCH] send-email: lazily assign editor variable Michael J Gruber
2010-03-22 16:41   ` Uwe Kleine-König
2010-03-23  0:58   ` Jonathan Nieder
2010-03-23 10:56     ` Michael J Gruber
2010-03-24 17:52   ` Junio C Hamano
2010-03-25  5:17     ` Jonathan Nieder
2010-03-26 19:32       ` Junio C Hamano
2010-03-26 21:45         ` Jonathan Nieder
2010-03-25  8:03     ` Michael J Gruber
2010-03-26 19:32       ` Junio C Hamano
2010-03-22 23:25 ` [PATCH] send-email: do not check for editor until needed Jonathan Nieder
2010-03-23  9:15   ` Peter Kjellerstedt
2010-03-23 19:25     ` Jonathan Nieder [this message]

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=20100323192557.GA1511@progeny.tock \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jaysoffian@gmail.com \
    --cc=m.kleine-budde@pengutronix.de \
    --cc=peter.kjellerstedt@axis.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).