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

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

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 9, 2012, 19:24 UTC
Message-ID
<201202092024.43381.jnareb@gmail.com>
In-Reply-To
<20120209033059.GA4347@sigill.intra.peff.net>
On Thu, 9 Feb 2012, Jeff King wrote:
Show 30 quoted lines
> On Tue, Feb 07, 2012 at 11:16:47AM -0800, Jakub Narebski wrote:
> > Jeff King <peff@peff.net> writes:
> > 
> > [...]
> > > Git-config could potentially help with that (and even simplify the
> > > current code) by allowing something like:
> > > 
> > >   $ git config --list-with-sources
> > >   /home/peff/.gitconfig user.name=Jeff King
> > >   /home/peff/.gitconfig user.email=peff@peff.net
> > >   .git/config core.repositoryformatversion=0
> > >   .git/config core.bare=false
> > >   [etc]
> > > 
> > > (you would use the "-z" form, of course, and the filenames would be
> > > NUL-separated, but I made up a human-readable output format above for
> > > illustration purposes).
> > 
> > That would be _very_ nice to have (even without includes support).
> > 
> > Filenames would be git-quoted like in ls-tree / diff-tree output without -z,
> > isn't it?  And is that TAB or SPC as a separator?
> 
> So the patch would look something like this. However, is the actual
> filename really what callers want? It seems like in David's case, an
> annotation of "repo", "global", or "system" (possibly in addition to the
> filename) would be the most useful (because in the git-cola UI, it is
> still nice to list things as "repo" or "global" instead of spewing the
> whole filename at the user -- but you would still want the individual
> filename for handling updates of includes).

I'm not sure if "system" / "global" / "local" or "repo" would be a good idea.

First, in the case of includes you would have to provide pathnames of included files. This would introduce inconsistency. Is "system" the '/etc/gitconfig' file, or 'system' file in '.git' directory?

Second, people can have different build configuration, e.g. the prefix might differ, so that "system" is not always '/etc/gitconfig'. If you want to edit config you would want to know which file to edit... and though there is "git config --system --edit" it depends on having editor configured correctly.

Just my two cents.
-- 
Jakub Narebski
Poland
Previous: Jeff KingNext: Jeff King
Message 18 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.