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

Re: [PATCH/RFC] gitweb: selectable configurations that change with each request

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Nov 11, 2010, 21:42 UTC
Message-ID
<20101111214250.GA27048@burratino>
In-Reply-To
<20101111213456.21127.36449.stgit@localhost.localdomain>
Jakub Narebski wrote:
Show 17 quoted lines
> This is done by introducing $per_request_config variable: if set to code
> reference, this code would be run once per request, while config file would
> be parsed only once.  For example gitolite's contrib/gitweb/gitweb.conf
> fragment mentioned in 7f425db could be rewritten as
> 
>   our $per_request_config = sub {
>   	$ENV{GL_USER} = ($cgi && $cgi->remote_user) || "gitweb";
>   };
> 
> to make use of this feature.
> 
> If $per_request_config is not a code reference, it is taken to be boolean
> variable, to choose between running config file for each request
> (flexibility), and running config file only once (performance in
> persistent environments).
> 
> The default value for $per_request_config is 1 (true)
Flexible, fast, backward-compatible.  Nice.
Previous: Jakub NarebskiNext: Junio C Hamano
Message 2 of 7 in “gitweb: selectable configurations that change with each request”
  1. gitweb: selectable configurations that change with each requestJakub Narebski, Nov 11, 2010
  2. Jonathan NiederNov 11, 2010
  3. Junio C HamanoNov 24, 2010
  4. Jakub NarebskiNov 24, 2010
  5. [PATCHv2] gitweb: selectable configurations that change with each requestJakub Narebski, Nov 25, 2010
  6. Jonathan NiederNov 25, 2010
  7. [PATCHv3] gitweb: selectable configurations that change with each requestJakub Narebski, Nov 25, 2010

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.