From mboxrd@z Thu Jan 1 00:00:00 1970 From: mailings at hupie.com (Ferry Huberts) Date: Mon, 06 Jun 2011 19:38:13 +0200 Subject: [PATCH 2/2] Add feature: obtain repo section from git config In-Reply-To: <20110606171344.GB6957@hjemli.net> References: <1307143262-11018-1-git-send-email-jamie.couture@gmail.com> <1307143262-11018-3-git-send-email-jamie.couture@gmail.com> <20110606171344.GB6957@hjemli.net> Message-ID: <4DED1085.60906@hupie.com> On 06/06/2011 07:13 PM, larsh at hjemli.net 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