All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>,
	git@vger.kernel.org, Christian Couder <chriscool@tuxfamily.org>,
	Petr Baudis <pasky@ucw.cz>
Subject: Re: [RFC/PATCH 1/4] gitweb: Move subroutines to Gitweb::Config module
Date: Sat, 12 Jun 2010 03:41:38 +0200	[thread overview]
Message-ID: <201006120341.39843.jnareb@gmail.com> (raw)
In-Reply-To: <AANLkTimfzjZ00ua23FDmUJLil-_OEPEkiS73syVCQ52f@mail.gmail.com>

On Sat, 12 Jun 2010, Ævar Arnfjörð Bjarmason wrote:
> On Sat, Jun 12, 2010 at 01:01, Jakub Narebski <jnareb@gmail.com> wrote:
>> On Tue, 8 June 2010, Ævar Arnfjörð Bjarmason wrote:
>>
>>> I haven't contributed to Gitweb, nor do I have to deal with it. But
>>> I've followed this series and reviewed most of the Perl code in
>>> Git. Take these with a grain of salt.
>>>
>>> It would be very useful for the future of our Perl code if we had a
>>> dual-life system in Git. I.e. a cpan/ directory where we could drop
>>> CPAN modules that should be shipped with Git.
>>
>> The standard name for such directory is 'inc/', I think.
> 
> Perl itself uses cpan/, but Module::Install started the inc/. What we
> call it really doesn't matter though.

Right.

Although better example would be what modules on CPAN use, rather than
what Perl itself uses.

>>> Then we could just use e.g. Config::General (~3k lines of code)
>>> instead of writing our own config system. There are probably lots of
>>> wheels that we're inventing (and are going to invent) that have been
>>> done better elsewhere, with more testing.
>>
>> The problem with _optional_ Config::General config is that people
>> would have incompatibile gitweb config files, some using Config::General
>> syntax, some current configuration in Perl.
> 
> Isn't the current patch series the first attempt at config file
> support? I.e. it's always been editing the source until now.

Errr... no!

$ git blame -C -C -w -L/^our.*'GITWEB_CONFIG'/,+12 gitweb/gitweb.perl
shows that current config file in Perl (loaded using 'do $file') is
with gitweb since at least 2006-08-02.
 
> In any case, proper non-executable config file support could easily be
> made optional, hopefully with a transition the non-executable one.

I'm not sure if it would be easy to translate currently used gitweb
config files to non-executable file format.  I think that %feature
hash make it so such config format would have to support nested 
structures, which means e.g. JSON or YAML.

Besides how would you store / define $export_auth_hook in non-executable
file format?

  # show repository only if this subroutine returns true
  # when given the path to the project, for example:
  #    sub { return -e "$_[0]/git-daemon-export-ok"; }
  our $export_auth_hook = undef;

-- 
Jakub Narebski
Poland

  reply	other threads:[~2010-06-12  1:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07 20:50 [RFC/PATCH 1/4] gitweb: Move subroutines to Gitweb::Config module Pavan Kumar Sunkara
2010-06-07 20:50 ` [RFC/PATCH 2/4] gitweb: Create Gitweb::HTML::Link module Pavan Kumar Sunkara
2010-06-07 20:50 ` [RFC/PATCH 3/4] gitweb: Create Gitweb::HTML module Pavan Kumar Sunkara
2010-06-07 20:50 ` [RFC/PATCH 4/4] gitweb: Create Gitweb::HTML::String module Pavan Kumar Sunkara
2010-06-07 20:58   ` Pavan Kumar Sunkara
2010-06-08 12:46 ` [RFC/PATCH 1/4] gitweb: Move subroutines to Gitweb::Config module Jakub Narebski
2010-06-08 13:50   ` Ævar Arnfjörð Bjarmason
2010-06-12  1:01     ` Jakub Narebski
2010-06-12  1:22       ` Ævar Arnfjörð Bjarmason
2010-06-12  1:41         ` Jakub Narebski [this message]
2010-06-08 14:13   ` Petr Baudis
2010-06-08 19:22     ` Pavan Kumar Sunkara
2010-06-08 19:55       ` Petr Baudis
2010-06-08 20:24         ` Pavan Kumar Sunkara
2010-06-08 20:50           ` Petr Baudis
2010-06-08 23:38       ` Jakub Narebski
2010-06-09 13:13         ` 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=201006120341.39843.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=avarab@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    --cc=pavan.sss1991@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.