Re: StGIT and repo-config
- From
Yann Dirson <ydirson@altern.org>
- Date
- Jan 26, 2007, 17:53 UTC
- Message-ID
- <20070126175302.GG4083@nan92-1-81-57-214-146.fbx.proxad.net>
- In-Reply-To
- <Pine.LNX.4.63.0701260052590.22628@wbgn013.biozentrum.uni-wuerzburg.de>
On Fri, Jan 26, 2007 at 12:58:38AM +0100, Johannes Schindelin wrote:
Show 6 quoted lines
> On Thu, 25 Jan 2007, Catalin Marinas wrote: > > What I'd like it to have is a single initial call to git-repo-config > > --list (in config_setup) and all the options cached in a dictionary (so > > that .git/config options would override the global ~/.gitconfig ones). > > The dictionary should also be pre-populated with the default values > > (only in memory, not going to the config file on disk).
Pre-filling with default value has a drawback: it will create lots of useless entries, especially for per-branch settings. I'd rather let the accessors return the default value when needed. We can still group all defaults in a single dictionnary.
> I then proposed to have a simple --dump option to repo-config, which > outputs NUL separated key/value pairs (substituting "true" for keys > without -- not with empty! -- values). But somehow the discussion petered > out before anything came out of it.
Even if that was to be done in git, it would surely be post-1.5, so we need another way to do things in the meantime.
> The most important point (to me) which came out of the discussion: It is > not at all easy, or straight-forward, to handle multi-vars, i.e. multiple > values for the same key.
Right, at least for filling a dictionnary. We would need to declare multi-valued parameters as such, which basically means we must only try to read those config items we know about, which has all sorts of consequences for config.py :)
It would seem reasonable to start without a cache dictionnary, at least for now. After all, there are not so many config items to know about in a single stgit run, so IIMHO we're only going to notice a difference for the time needed to run the testsuite.
Best regards,
-- Yann.