From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: support perl 5.6
Date: Sun, 10 Sep 2006 00:20:09 +0200 [thread overview]
Message-ID: <edveli$p2m$1@sea.gmane.org> (raw)
In-Reply-To: 20060909145914.GA25289@liacs.nl
Sven Verdoolaege wrote:
> +# returns pipe reading from git command with given arguments
> +sub git_pipe {
> + open my $fd, "-|", join(' ', git_cmd(), @_) or return undef;
> + return $fd;
> +}
> +
I'm sorry, but this is not enough. For example the $file_name argument
should be quoted in shell, i.e. in three argument magic open "-|". So
either you return to your old patch, which changes each list form of open
"-|" into old three argument form (which adds penalty of additional shell
invocation, and is prone to shell interpretation of arguments), and
sometimes add quotes (e.g. "... \'$file_name\' ..."), or (what would be
better) to reimplement list form of open "-|" using two argument forking
open "-|", and doing exec in child, a la "Safe Pipe Opens" in perlipc(3pm).
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2006-09-09 22:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-09 14:59 [PATCH] gitweb: support perl 5.6 Sven Verdoolaege
2006-09-09 22:20 ` Jakub Narebski [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-09-09 14:42 Sven Verdoolaege
2006-09-09 10:46 Sven Verdoolaege
2006-09-09 12:19 ` 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='edveli$p2m$1@sea.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/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).