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

Re: [PATCH v3] Gitweb: Use a default for a bad env config file variable

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 11, 2010, 00:08 UTC
Message-ID
<20100811000846.GF2099@burratino>
In-Reply-To
<1281458849.28858.18.camel@ping.CS.McGill.CA>
Hi James,
James Shubin wrote:
> Signed-off-by: James Shubin <purpleidea@gmail.com>
[...]
Show 5 quoted lines
> 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.

Previous: James ShubinNext: Michael J Gruber
Message 8 of 9 in “Use a default for a bad env config file variable”
  1. Use a default for a bad env config file variableJames, Aug 10, 2010
  2. Matthieu MoyAug 10, 2010
  3. JamesAug 10, 2010
  4. Ævar Arnfjörð BjarmasonAug 10, 2010
  5. Gitweb: Use a default for a bad env config file variableJames Shubin, Aug 10, 2010
  6. Jakub NarebskiAug 10, 2010
  7. James ShubinAug 11, 2010
  8. Jonathan NiederAug 11, 2010
  9. Michael J GruberAug 10, 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.