Subject: Re: Syntax highlighting for gitweb

From: Jakub Narebski <[email-masked]>
Date: Tue, 27 Feb 2007 02:45:10 +0100

Johannes Schindelin wrote:

> On Mon, 26 Feb 2007, Ed Schouten wrote:
> 
>> I just wrote a really awful patch to add syntax highlighting to gitweb:
>> 
>> [...]
>>
>> +    $pid = open2(\*HLR, \*HLW, "highlight -f --syntax c");
> 
> Since this fork()s an external program, which is possibly expensive, or 
> can fail because the program is not there, you should at least
> 
> - document it, and
> - make it optional.

It was planned (search for "[RFC] gitweb wishlist and TODO list" in
archives), and gitweb-xmms2 (http://git.xmms.se/?p=gitweb-xmms2.git)
has it: see http://git.or.cz/gitwiki/InterfacesFrontendsAndTools#gitweb
but it was postponed together with committags support to have git config
reader in Perl to use in gitweb.

Hmmm... perhaps we should use open2 in few places where we use non-list form
of magic open "-|" (the one which spawns shell)?
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git