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

Re: [PATCH] gitweb: support perl 5.6

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 9, 2006, 22:20 UTC
Message-ID
<edveli$p2m$1@sea.gmane.org>
In-Reply-To
<20060909145914.GA25289@liacs.nl>
Sven Verdoolaege wrote:
Show 6 quoted lines
> +# 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
Previous: Sven Verdoolaege
Message 2 of 2 in “gitweb: support perl 5.6”
  1. gitweb: support perl 5.6Sven Verdoolaege, Sep 9, 2006
  2. Jakub NarebskiSep 9, 2006

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.