git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: StGIT and repo-config

From
Yann Dirson <ydirson@altern.org>
Date
Jan 27, 2007, 10:33 UTC
Message-ID
<20070127103354.GE4036@nan92-1-81-57-214-146.fbx.proxad.net>
In-Reply-To
<Pine.LNX.4.63.0701270008410.22628@wbgn013.biozentrum.uni-wuerzburg.de>
On Sat, Jan 27, 2007 at 12:12:36AM +0100, Johannes Schindelin wrote:
Show 6 quoted lines
> > 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.
> 
> I don't think it is too late. If it is simple enough, and stuck behind a 
> command line option (not affecting the rest of repo-config), it is safe 
> enough to include.
That would be great.
Show 13 quoted lines
> > > 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 :)
> 
> Well, we have only two multi-valued keys at the moment (AFAIK): 
> remote.<branch>.fetch and remove.<branch>.push.
> 
> Even if there are more, they are hardly interesting to StGIT, right?

Not completely right. It is precisely remote.<branch>.fetch I'm needing, to be able to locate which remote a parent branch belongs to when creating a stack. It may be that the problem is git-remote being too limited, and if we implement the functionnality at that level, then maybe we can ignore those config settings. But maybe not, since I'd like stack creation to record a remote.<stack>.fetch entry.

> So why not just pretend that they don't exist, by making a
> dictionary, putting each new key/value pair into it one by one? 
> (Forgetting all but the last value for multi-values...)
IMHO, that'd be the easiest way to shoot ourselves in the foot :)
Show 7 quoted lines
> > 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.
> 
> The point is: it is very easy and short to just stash everything into a 
> dictionary, and retrieve it from there.

OTOH, it is equally easy (if not easier) to call "git repo-config --get" or --get-all when needed :)

Best regards,
-- 
Yann.
Previous: Johannes SchindelinNext: Catalin Marinas
Message 7 of 8 in “StGIT and repo-config”
  1. Yann DirsonJan 25, 2007
  2. Catalin MarinasJan 25, 2007
  3. Johannes SchindelinJan 25, 2007
  4. Yann DirsonJan 26, 2007
  5. Catalin MarinasJan 26, 2007
  6. Johannes SchindelinJan 26, 2007
  7. Yann DirsonJan 27, 2007
  8. Catalin MarinasJan 28, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.