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

Re: [PATCH] send-email: do not check for editor until needed

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Mar 23, 2010, 19:25 UTC
Message-ID
<20100323192557.GA1511@progeny.tock>
In-Reply-To
<A612847CFE53224C91B23E3A5B48BAC73EC0B01EE8@xmail3.se.axis.com>
Peter Kjellerstedt wrote:
Show 9 quoted lines
> 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

Previous: Peter Kjellerstedt
Message 14 of 14 in “[REGRESSION] git var GIT_EDITOR fails without tty”
  1. Uwe Kleine-KönigMar 22, 2010
  2. send-email: lazily assign editor variableMichael J Gruber, Mar 22, 2010
  3. Uwe Kleine-KönigMar 22, 2010
  4. Jonathan NiederMar 23, 2010
  5. Michael J GruberMar 23, 2010
  6. Junio C HamanoMar 24, 2010
  7. Jonathan NiederMar 25, 2010
  8. Junio C HamanoMar 26, 2010
  9. Jonathan NiederMar 26, 2010
  10. Michael J GruberMar 25, 2010
  11. Junio C HamanoMar 26, 2010
  12. send-email: do not check for editor until neededJonathan Nieder, Mar 22, 2010
  13. Peter KjellerstedtMar 23, 2010
  14. Jonathan NiederMar 23, 2010

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.