git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Ben Walton <bwalton@artsci.utoronto.ca>
Cc: peff <peff@peff.net>, jrnieder <jrnieder@gmail.com>,
	gitster <gitster@pobox.com>, git <git@vger.kernel.org>
Subject: Re: [PATCH] Do not use SHELL_PATH from build system in prepare_shell_cmd on Windows
Date: Tue, 17 Apr 2012 16:00:25 +0200	[thread overview]
Message-ID: <4F8D7779.9080506@viscovery.net> (raw)
In-Reply-To: <1334670128-sup-4966@pinkfloyd.chass.utoronto.ca>

Am 4/17/2012 15:45, schrieb Ben Walton:
> Excerpts from Johannes Sixt's message of Tue Apr 17 03:03:21 -0400 2012:
>> The recent change to use SHELL_PATH instead of "sh" to spawn shell
>> commands is not suited for Windows:
> 
> Ah yes, I can see how that would be undesirable on Windows.
> 
>> +#ifndef WIN32
>>          nargv[nargc++] = SHELL_PATH;
>> +#else
>> +        nargv[nargc++] = "sh";
>> +#endif
>>          nargv[nargc++] = "-c";
> 
> A minor style question: Would this conditional code not be better if
> it were up where the fallback SHELL_PATH is set?  That would leave
> this code block #ifdef free while still avoiding the breakage on
> Windows.

It would require either to #define yet another new name to SHELL_PATH or
"sh", or to #undef SHELL_PATH and re#define it for WIN32. Neither is very
appealing. I personally prefer to have the conditional (if it is as short
as this one) at the point where it matters.

-- Hannes

  reply	other threads:[~2012-04-17 14:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7vvclmoit6.fsf@alter.siamese.dyndns.org>
2012-03-31  1:33 ` [PATCH] Use SHELL_PATH from build system in run_command.c:prepare_shell_cmd Ben Walton
2012-03-31  3:48   ` Jonathan Nieder
2012-03-31  5:38     ` Junio C Hamano
2012-03-31  5:55   ` Jonathan Nieder
2012-03-31 17:49     ` Junio C Hamano
2012-03-31 18:04       ` Junio C Hamano
2012-04-17  7:03   ` [PATCH] Do not use SHELL_PATH from build system in prepare_shell_cmd on Windows Johannes Sixt
2012-04-17 13:45     ` Ben Walton
2012-04-17 14:00       ` Johannes Sixt [this message]
2012-04-17 14:04         ` Ben Walton
2012-04-17 22:14     ` Jeff King
2012-04-18  5:39       ` Johannes Sixt
2012-04-18  7:27         ` Jeff King
2012-04-18 16:30         ` Junio C Hamano
2012-04-19  5:36           ` Johannes Sixt
2012-04-19  5:49             ` 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=4F8D7779.9080506@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=bwalton@artsci.utoronto.ca \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    /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).