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

Re: [RFC 2/2] Automatically transform .git/{branches,remotes} into .git/config

From
JWJosef Weidendorfer <josef.weidendorfer@gmx.de>
Date
Nov 28, 2005, 12:59 UTC
Message-ID
<200511281359.04741.Josef.Weidendorfer@gmx.de>
In-Reply-To
<438AC32E.5010100@op5.se>
On Monday 28 November 2005 09:43, Andreas Ericsson wrote:
Show 13 quoted lines
> Junio C Hamano wrote:
> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> > 
> > 
> >>I only realized that we -- in the good tradition of UNIX -- have many 
> >>different formats for different configurations: Some configurations are in 
> >>.gitignore, some are in .git/branches/, some in .git/remotes/, some in 
> >>.git/config, and even some in environment variables!
> > 
> > 
> > Can you live with something like this?
> > 
> >  - we will add new ones to config, now we have it;
It is not really fitting for all purposes (eg. syntax restrictions).
> I'd still like to see git-repo-config and git-user-config. Otherwise 
> we'll need to continue having user-based environment variables 
> (GIT_COMMITTER_IDENT and friends).
In fact, it would be nice to have different "config levels" supported
by git. I can imagine:
(1) user config (typically in $HOME/.gitrc)
(2) project config (in .git/project.conf)
(3) repository config; i.e. separate for every clone
    (in .git/repo.conf instead of .git/config as of now?)
Even for one such level, it would be nice to be able to seperate the
config into multiple files; ie. remote config in a .git/remote.conf,
and a porcelain should be able to have its own config files, but still
using git's config parser.

To allow for this, git_config() should not be hardcoded to only read .git/config, but perhaps a list of files in environment variable GIT_CONFIG_FILES.

For (2), git-clone should copy some files, e.g. the .git/project.conf or .git/info/exclude. But project config probably should be kept up to date among all repositories for a project, i.e. it should be version controlled itself, but independent from the project. We could use a project config head .git/refs/projectconfig for this; of course post-1.0 material.

Josef
Previous: Junio C HamanoNext: Andreas Ericsson
Message 12 of 21 in “[RFC 2/2] Automatically transform .git/{branches,remotes} into .git/config”
  1. Johannes SchindelinNov 21, 2005
  2. Josef WeidendorferNov 21, 2005
  3. Johannes SchindelinNov 21, 2005
  4. Josef WeidendorferNov 21, 2005
  5. Andreas EricssonNov 21, 2005
  6. Junio C HamanoNov 21, 2005
  7. Petr BaudisNov 27, 2005
  8. Johannes SchindelinNov 28, 2005
  9. Junio C HamanoNov 28, 2005
  10. Andreas EricssonNov 28, 2005
  11. Junio C HamanoNov 28, 2005
  12. Josef WeidendorferNov 28, 2005
  13. Andreas EricssonNov 28, 2005
  14. Generic configuration plumbing (Was: Re: [RFC 2/2] Automatically transform...)Josef Weidendorfer, Nov 28, 2005
  15. Johannes SchindelinNov 28, 2005
  16. Petr BaudisNov 28, 2005
  17. Josef WeidendorferNov 28, 2005
  18. Junio C HamanoNov 29, 2005
  19. Johannes SchindelinNov 28, 2005
  20. Petr BaudisNov 28, 2005
  21. Johannes SchindelinNov 28, 2005

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.