From: Jonathan Nieder <jrnieder@gmail.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org, Julio Lajara <julio.lajara@alum.rpi.edu>,
Sitaram Chamarty <sitaram@atc.tcs.com>
Subject: Re: [PATCH/RFC] gitweb: selectable configurations that change with each request
Date: Thu, 11 Nov 2010 15:42:50 -0600 [thread overview]
Message-ID: <20101111214250.GA27048@burratino> (raw)
In-Reply-To: <20101111213456.21127.36449.stgit@localhost.localdomain>
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.
next prev parent reply other threads:[~2010-11-11 21:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 21:36 [PATCH/RFC] gitweb: selectable configurations that change with each request Jakub Narebski
2010-11-11 21:42 ` Jonathan Nieder [this message]
2010-11-24 17:57 ` Junio C Hamano
2010-11-24 21:43 ` Jakub Narebski
2010-11-25 12:18 ` [PATCHv2] " Jakub Narebski
2010-11-25 18:23 ` Jonathan Nieder
2010-11-25 18:43 ` [PATCHv3] " Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101111214250.GA27048@burratino \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=julio.lajara@alum.rpi.edu \
--cc=sitaram@atc.tcs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).