On Thu, 9 Feb 2012, Jeff King wrote: > On Tue, Feb 07, 2012 at 11:16:47AM -0800, Jakub Narebski wrote: > > Jeff King <peff@xxxxxxxx> 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@xxxxxxxx > > > .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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html