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

Re: Syntax highlighting for gitweb

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 27, 2007, 01:45 UTC
Message-ID
<es02au$ocf$1@sea.gmane.org>
In-Reply-To
<Pine.LNX.4.63.0702261953420.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin wrote:
Show 13 quoted lines
> 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
Previous: Johannes Schindelin
Message 3 of 3 in “Syntax highlighting for gitweb”
  1. Ed SchoutenFeb 26, 2007
  2. Johannes SchindelinFeb 26, 2007
  3. Jakub NarebskiFeb 27, 2007

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.