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

Re: [PATCH 0/2] config includes, take 2

From
Jeff King <peff@peff.net>
Date
Feb 7, 2012, 18:29 UTC
Message-ID
<20120207182953.GA32367@sigill.intra.peff.net>
In-Reply-To
<7vpqdq1pxt.fsf@alter.siamese.dyndns.org>
On Tue, Feb 07, 2012 at 10:03:26AM -0800, Junio C Hamano wrote:
Show 8 quoted lines
> > But isn't "git cola" a git-config editing program?
> 
> Yes, that is really the right "rhetorical" question to ask.  It needs to
> know what it is editing, so it at least needs to be _aware_ of the
> inclusion, where each item comes from, and how to edit contents of _one_
> particular file.
> 
> And that issue is not something new that was introduced by include.path.

True, but it was made more complex. David has already dealt with the 3 sources in his code. Adding includes expands this to N sources, and his code needs to adapt. It would be nice if we could at least make the adaptation backwards-compatible and as painless as possible.

But I just see the "right" answer in a complex case needing user input that a simple call to "git config" can't provide. That is, pretending that "git config --global" is still a single file for reading and writing can get you something that _works_, but it will make a mess of the user's config. The most elegant thing to me is to expand git-cola's config editor into an N-pane editor instead of a 2-pane editor (not 3, because it doesn't make sense to edit /etc/gitconfig with it, and nor does the current version support it). People without includes wouldn't notice the difference, and people with includes might appreciate the power and flexibility.

-Peff
Previous: Junio C HamanoNext: Jakub Narebski
Message 13 of 19 in “config includes, take 2”
  1. 0/2 config includes, take 2Jeff King, Feb 6, 2012
  2. 1/2 imap-send: remove dead codeJeff King, Feb 6, 2012
  3. 2/2 config: add include directiveJeff King, Feb 6, 2012
  4. Junio C HamanoFeb 6, 2012
  5. Michael HaggertyFeb 6, 2012
  6. Jeff KingFeb 6, 2012
  7. Jeff KingFeb 6, 2012
  8. David AguilarFeb 7, 2012
  9. Jeff KingFeb 7, 2012
  10. David AguilarFeb 7, 2012
  11. Jeff KingFeb 7, 2012
  12. Junio C HamanoFeb 7, 2012
  13. Jeff KingFeb 7, 2012
  14. Jakub NarebskiFeb 7, 2012
  15. Jeff KingFeb 7, 2012
  16. David AguilarFeb 7, 2012
  17. Jeff KingFeb 9, 2012
  18. Jakub NarebskiFeb 9, 2012
  19. Jeff KingFeb 9, 2012

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.