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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Narebski wrote:

> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]