git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Luciano Rocha <luciano@eurotux.com>
Cc: Denis Bueno <dbueno@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: git-instaweb portability issue (maybe?)
Date: Fri, 13 Jun 2008 08:32:20 -0700 (PDT)	[thread overview]
Message-ID: <m363sdqrk0.fsf@localhost.localdomain> (raw)
In-Reply-To: <20080613151307.GA21917@bit.office.eurotux.com>

Luciano Rocha <luciano@eurotux.com> writes:
> On Fri, Jun 13, 2008 at 10:39:11AM -0400, Denis Bueno wrote:
>> On Fri, Jun 13, 2008 at 10:21, Luciano Rocha <luciano@eurotux.com> wrote:
>>>
>>> Try changing the following line instead:
>>>        "$PERL" -p -e "$script" "$1.tmp" > "$1"
>>> to
>>>        $PERL -p -e "$script" "$1.tmp" > "$1"
>>>
>>> about line 6121 of the git-instaweb script.
>> 
>> This is line 6033 for me; however, this change makes it work!  (I
>> verified my changing this line; trying it; then changing it back to
>> the double-quotes version, and verifying it breaks.)
>> 
>> Why?
> 
> "$PERL" means the content of the variable is used as the command to
> execute.
> 
> $PERL, on the other hand, goes through a round of word splitting, that
> in your case results in the command "/usr/bin/env", with the arguments
> "perl", "-p", ...
> 
> Thus, if it is possible to use /usr/bin/env, the current "$PERL"
> incantation is incorrect.

The problem is with trying to ensure that both

   /path/with spaces/perl

and

   /usr/bin/env perl

work, as they require different rules wrt. splitting on whitespace...

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2008-06-13 15:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13 13:26 git-instaweb portability issue (maybe?) Denis Bueno
2008-06-13 13:38 ` Denis Bueno
2008-06-13 13:46   ` Asheesh Laroia
2008-06-13 13:59     ` Denis Bueno
2008-06-13 14:10       ` Chris Ridd
2008-06-13 14:16         ` Asheesh Laroia
2008-06-13 14:42           ` Chris Ridd
2008-06-13 14:47             ` Denis Bueno
2008-06-13 14:21   ` Luciano Rocha
2008-06-13 14:39     ` Denis Bueno
2008-06-13 15:13       ` Luciano Rocha
2008-06-13 15:32         ` Jakub Narebski [this message]
2008-06-13 15:39           ` Luciano Rocha
2008-06-13 14:22 ` Jakub Narebski

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=m363sdqrk0.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=dbueno@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=luciano@eurotux.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).