git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Erik Faye-Lund <kusmabite@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, msysgit@googlegroups.com, j6t@kdbg.org
Subject: Re: [msysGit] [PATCH/RFC] alias: use run_command api to execute aliases
Date: Fri, 7 Jan 2011 15:24:25 +0100	[thread overview]
Message-ID: <AANLkTi=6wG6khBAqLA8nki5-wbxQB-oYUAgMSqT-egpt@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.1101070216390.1542@bonsai2>

On Fri, Jan 7, 2011 at 2:17 AM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Thu, 6 Jan 2011, Erik Faye-Lund wrote:
>
>> On Windows, system() executes with cmd.exe instead of /bin/sh. This
>> means that aliases currently has to be batch-scripts instead of
>> bourne-scripts. On top of that, cmd.exe does not handle single quotes,
>> which is what the code-path currently uses to handle arguments with
>> spaces.
>>
>> To solve both problems in one go, use run_command_v_opt() to execute
>> the alias. It already does the right thing prepend "sh -c " to the
>> alias.
>
> Would this not break setups where aliases were defined to execute batch
> scripts?
>
> If this is true, I'm of two minds here.
>

It would indeed, but I wouldn't worry TOO much about it. We've clearly
told the users that Git for Windows is a tool that you have to be
willing to work on to use.

But I'm kind of of two minds here myself, but for a slightly different
reason: I think Git for Windows SHOULD use cmd.exe to execute scripts.
We should be able to lose the msys-environment and still have the
basic functionality working. In that sense, this is a step in the
wrong direction. But I'd rather have all code use the same code-path
to execute scripts, and make a bit switch to cmd.exe together with
porting all supplied scripts to batch-files some time in the future.

  reply	other threads:[~2011-01-07 14:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 19:13 [PATCH/RFC] alias: use run_command api to execute aliases Erik Faye-Lund
2011-01-06 19:41 ` Jonathan Nieder
2011-01-06 19:52   ` Erik Faye-Lund
2011-01-07  1:17 ` [msysGit] " Johannes Schindelin
2011-01-07 14:24   ` Erik Faye-Lund [this message]
2011-01-07 14:51     ` Johannes Schindelin
2011-01-07 19:21       ` 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='AANLkTi=6wG6khBAqLA8nki5-wbxQB-oYUAgMSqT-egpt@mail.gmail.com' \
    --to=kusmabite@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=msysgit@googlegroups.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).