git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Eric Wong" <normalperson@yhbt.net>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	git@vger.kernel.org, "Jakub Narebski" <jnareb@gmail.com>,
	"Pavan Kumar Sunkara" <pavan.sss1991@gmail.com>
Subject: Re: [PATCH 1/4] instaweb: ignore GITWEB_CONFIG_SYSTEM
Date: Fri, 3 Sep 2010 13:20:42 -0500	[thread overview]
Message-ID: <20100903182042.GB2341@burratino> (raw)
In-Reply-To: <7vfwxqzqoq.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:

>> The configuration in /etc/gitweb.conf might specify any old
>> layout; in particular, it is likely not to be identical to that
>> which git instaweb sets up.  Noticed by Uwe Kleine-König.
>
> I am not sure if this is a reasonable change by reading the above.  In
> some cases, the file may stale, but in other cases, it may specify what
> the site administrator wants its users to be using, no?

Yes, I should have mentioned this.

By analogy with .gitconfig, one might want "git instaweb" to check
GITWEB_CONFIG_LOCAL, GITWEB_CONFIG_GLOBAL, and GITWEB_CONFIG_SYSTEM in
that order, taking values from all three.  A GITWEB_CONFIG envvar
could override them all.

But stepping back a moment, what would this accomplish?  The gitweb
configuration specifies

 - what git version to use;
 - site branding;
 - what directory projects are relative to (*);
 - how deep to search for projects;
 - where the list of projects is (*);
 - how to demonstrate project consent to be shown (*);
 - whether to be a stickler about hiding secrets;
 - where gitweb.css, git-logo.png, git-favicon.png, and gitweb.js are (*);
 - base URI for relative paths used above (*);
 - what extra features (e.g. "snapshot") to enable;
 - MIME types, diff options, etc.

The items marked with a (*) are, in the regime used by git 1.7.1,
specific to the "git instaweb" instance, since it is all about showing
the current git repo and provides its own copies of gitweb.cgi instead
of relying on copies in /usr/share/gitweb.

The items not marked with (*) might indeed benefit from some global
site defaults.  But unfortunately, that is already not what
/etc/gitweb.conf is: it is rather used as a unit as a fallback when a
separate gitweb_config.perl is not present.

In git 1.7.2 and later, "git instaweb" provides the gitweb_config.perl
and this discussion becomes academic.

>> -s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;'
>> +s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;
>> +s#(my|our) \$GITWEB_CONFIG_SYSTEM =.*#$1 \$GITWEB_CONFIG_SYSTEM = "";#;'
>
> Perhaps moving the last ' to its own line would help maintaining the
> script in the longer term?

Good idea; thanks.

  reply	other threads:[~2010-09-03 18:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100812131152.2333.9604.reportbug@octopus.hi.pengutronix.de>
2010-09-02 22:12 ` git instaweb for Debian squeeze (Re: Bug#592733: git instaweb broken) Jonathan Nieder
2010-09-02 22:36   ` Eric Wong
2010-09-02 23:52     ` [PATCH/RFC maint-1.7.1 0/4] instaweb 1.7.1 fixes for Debian squeeze Jonathan Nieder
2010-09-02 23:54       ` [PATCH 1/4] instaweb: ignore GITWEB_CONFIG_SYSTEM Jonathan Nieder
2010-09-03 17:23         ` Junio C Hamano
2010-09-03 18:20           ` Jonathan Nieder [this message]
2010-09-03 23:58           ` Jonathan Nieder
2010-09-04  1:36             ` Junio C Hamano
2010-09-04  2:19               ` Jonathan Nieder
2010-09-02 23:55       ` [PATCH 2/4] gitweb: skip logo in atom feed when there is none Jonathan Nieder
2010-09-02 23:56       ` [PATCH 3/4] gitweb: make logo optional Jonathan Nieder
2010-09-02 23:57       ` [PATCH 4/4] instaweb: disable logo and favicon by default Jonathan Nieder
2010-09-03  2:19         ` [PATCH v2 " Jonathan Nieder
2010-09-03  1:09       ` [PATCH/RFC maint-1.7.1 0/4] instaweb 1.7.1 fixes for Debian squeeze Eric Wong

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=20100903182042.GB2341@burratino \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=normalperson@yhbt.net \
    --cc=pavan.sss1991@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).