List for cgit developers and users
 help / color / mirror / Atom feed
From: jamie.couture at gmail.com (Jamie Couture)
Subject: [PATCH 2/2] Add feature: obtain repo section from git config
Date: Mon, 06 Jun 2011 14:31:02 -0400	[thread overview]
Message-ID: <4DED1CE6.9060300@gmail.com> (raw)
In-Reply-To: <4DED1085.60906@hupie.com>

On 11-06-06 01:38 PM, Ferry Huberts wrote:
> 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.
The motivation was more about being lazy for those who use scan-path to 
pick up repositories, and only serves to help the presentation / 
separation of sections in the front-end, but is by no means easier to 
maintain.  I agree that mixing configuration is clumsy.

In my case, I was using gitoilte + cgit.  Perhaps I overlooked a feature 
of gitolite to create repositories based on some path, say:
parent/{section1, ..., sectionN}/actual_project.git (the 
section-from-path feature should have been used in this case). Instead 
everything is living as children from a common parent, which is how I 
currently have it setup.

> 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.
>
I was trying to do as little touching of cgitrc as possible, with 
respect to updating / maintaining repository information.

Thanks for the consideration; I appreciate the feedback.


Jamie Couture




  parent reply	other threads:[~2011-06-06 18:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 23:21 [PATCH 0/2] Set section via " jamie.couture
2011-06-03 23:21 ` [PATCH 1/2] avoid memory leak jamie.couture
2011-06-06 16:57   ` larsh
2011-06-03 23:21 ` [PATCH 2/2] Add feature: obtain repo section from git config jamie.couture
2011-06-06 17:13   ` larsh
2011-06-06 17:38     ` mailings
2011-06-06 17:48       ` larsh
2011-06-06 18:18         ` mailings
2011-06-06 18:31       ` jamie.couture [this message]
2011-06-06 18:39         ` mailings
  -- strict thread matches above, loose matches on Subject: below --
2011-06-03 13:54 [PATCH 1/2] avoid memory leak jamie.couture
2011-06-03 13:54 ` [PATCH 2/2] Add feature: obtain repo section from git config jamie.couture
     [not found] <jamie.couture@gmail.com>
2011-06-02 23:40 ` [PATCH 1/2] avoid memory leak jamie.couture
2011-06-02 23:40   ` [PATCH 2/2] Add feature: obtain repo section from git config jamie.couture

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=4DED1CE6.9060300@gmail.com \
    --to=cgit@lists.zx2c4.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 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).