From: Catalin Marinas Date: Thu, 25 Jan 2007 23:45:45 GMT Subject: Re: StGIT and repo-config Message-ID: In-Reply-To: <20070125225512.GF4083@nan92-1-81-57-214-146.fbx.proxad.net> On 25/01/07, Yann Dirson wrote: > I'm trying to get StGIT to work with git's config information. > Currently, the stgit.config stuff uses a generic ConfigParser, which > I'm not sure is adequate for the work: There are some drawbacks indeed and it currently reads the configs and transforms them slightly before passing them to ConfigParser. StGIT initially had its own config files (git config came a bit later). It would be good to have this re-written. It is even better to use something like config.get('user.name') rather than config.get('user', 'name') as in ConfigParser. 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). For the options setting, it shouldn't probably need to use --global. As above, these options should be cached in the dictionary as well. -- Catalin