On 06/06/2011 07:13 PM, [email protected] wrote:
> On Fri, Jun 03, 2011 at 07:21:02PM -0400, Jamie Couture wrote:
>> +section-from-repo-config::
>> +    If set to "1" obtain the section name from git config. The expected 
>> config
>> +    section.key that is used is "cgit.section".
>> +    Ex: $ git config cgit.section mysection
>> +    An alternative to section-from-path, and will not check git config if
>> +    section-from-path is set. See also: scan-path.  This must be defined 
>> prior
>> +    to scan-path.
>> +
> 
> * What value is added by $GITDIR/config compared to $GITDIR/cgitrc?
> * If we want to support reading repo-config from $GITDIR/config, why not
>   implement all the options supported by a $GITDIR/cgitrc?
> 

I thought about this too.

It seems attractive but to me is mixing concerns: git and cgit are two
different tools (although closely tied). Having cgit store (part of) its
configuration in git configuration files is not good architecture,
unwise and fragile since it make the cgit configuration directly
dependent on git configuration. cgit can't change it's configuration
format since it has to follow git's and once git changes its format cgit
immediately breaks.

I'd prefer not doing this (everything in $GITDIR/config). I think it's
better to have $GITDIR/cgitrc files that hold the repo settings.

There is this setting called repo.path though that then is kind of an
annoyance to set and update. If we always use $GITDIR/cgitrc files then
the repo.path setting could be automatically deduced by cgit.


-- 
Ferry Huberts

_______________________________________________
cgit mailing list
[email protected]
http://hjemli.net/mailman/listinfo/cgit

Reply via email to