git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: James Shubin <purpleidea@gmail.com>
Cc: git@vger.kernel.org, Michael J Gruber <git@drmicha.warpmail.net>,
	Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	avarab@gmail.com, Jakub Narebski <jnareb@gmail.com>
Subject: Re: [PATCH v3] Gitweb: Use a default for a bad env config file variable
Date: Tue, 10 Aug 2010 19:08:46 -0500	[thread overview]
Message-ID: <20100811000846.GF2099@burratino> (raw)
In-Reply-To: <1281458849.28858.18.camel@ping.CS.McGill.CA>

Hi James,

James Shubin wrote:

> Signed-off-by: James Shubin <purpleidea@gmail.com>
[...]
> It's quite trivial really, all that changes is that if someone sets
> the environment variable: $GITWEB_CONFIG_SYSTEM, and this points to
> something like: /srv/gitosis/gitweb.conf, which doesn't actually
> exist, then gitweb will default to trying out the built in default of
> /etc/gitweb.conf (if it was built with that value).
[...]
|	our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
|	our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++"; # die if there are errors parsing config file
|	if (-e $GITWEB_CONFIG) {
|		do $GITWEB_CONFIG;
|		die $@ if $@;
|	} elsif (-e $GITWEB_CONFIG_SYSTEM) {
|		do $GITWEB_CONFIG_SYSTEM;
|		die $@ if $@;
|	} elsif (-e "++GITWEB_CONFIG_SYSTEM++") {
|		...

Interesting.  I am a bit nervous that this might be confusing.
cc-ing Jakub for input.

  parent reply	other threads:[~2010-08-11  0:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-10 15:11 [Patch] Use a default for a bad env config file variable James
2010-08-10 15:41 ` Matthieu Moy
2010-08-10 15:54   ` James
2010-08-10 16:02     ` Ævar Arnfjörð Bjarmason
2010-08-10 16:47       ` [PATCH v3] Gitweb: " James Shubin
2010-08-10 22:42         ` Jakub Narebski
2010-08-11 13:36           ` James Shubin
2010-08-11  0:08         ` Jonathan Nieder [this message]
2010-08-10 16:08     ` [Patch] " Michael J Gruber

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=20100811000846.GF2099@burratino \
    --to=jrnieder@gmail.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=avarab@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=purpleidea@gmail.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).