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

User-wide Git config directory (was Re: [PATCH v2] Let core.excludesfile default to ~/.gitexcludes.)

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jan 2, 2010, 12:05 UTC
Message-ID
<vpqk4w0lnju.fsf_-_@bauges.imag.fr>
In-Reply-To
<7vk4w4z1h6.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>> Nanako Shiraishi <nanako3@lavabit.com> writes:
>>
>>> Junio, could you tell us what happened to this thread?
>>
>> I'm not Junio, but I can try ...
>> ...
>> So, I dropped the patch until we get closer to a consensus on what the
>> default value should be.
>
> Thanks for status updates.  Should we start trying to reach a consensus on
> how to move forward, or is it not your itch?

I wouldn't say it's not my itch. But I'm not sure I'm the best person to do the job (job = comming close to a consensus, not writting the code, which shouldn't be hard). Still, I can at least participate ;-).

> It is not _too_ bad to treat ~/.gitconfig specially and support reading
> from ~/.$SOMEGITTTYNAME/{excludes,attributes} files.
Let's throw in some ideas about what ~/$SOMEGITTTYNAME/ could be :
1) ~/.git/ => no, that would clash with people versioning their $HOME.
2) ~/.gitconfig/ => no, there's already a file ~/.gitconfig
3) ~/.gitglobal/ => that's an option.
4) ~/.config/git/ or, if set, $XDG_CONFIG_HOME/git/ (see
   http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html )
   => my prefered one, already discussed in a different context here :
   http://thread.gmane.org/gmane.comp.version-control.git/135447/focus=135559

Then, there's the question of what to put in this directory. I can see two and a half options:

a) ~/.$SOMEGITTTYNAME/{excludes,attributes} as you propose.
a') ~/.$SOMEGITTTYNAME/{ignore,attributes} => I think "ignore" is the
   advertized vocabulary most of the time in porcelain, and "excludes"
   exists mostly for historical reasons.
b) ~/.$SOMEGITTTYNAME/<same thing as the content of $GIT_DIR>, that
   is:
   ~/.$SOMEGITTTYNAME/info/exclude
   ~/.$SOMEGITTTYNAME/info/attributes
   and perhaps
   ~/.$SOMEGITTTYNAME/config
   we could imagine also
   ~/.$SOMEGITTTYNAME/hooks

If I were really happy with the layout of $GIT_DIR, I'd vote for b) for consistancy. But I'm not _that_ happy with it: why are exclude and attributes not in the same directory as config? why is exclude singular and attributes plural?

So, I dunno.
> We can also add support for ~/.$SOMEGITTYNAME/config and try reading
> from it as well, but even if we did so I don't think we should stop
> reading from ~/.gitconfig.

Yes, people having a ~/.gitconfig around should be able to continue to use it (for years at least, and most likely forever).

And you're right to present it as a different problem. Perhaps we should solve the problem above before starting debating about this one.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Junio C Hamano
Message 16 of 17 in “let core.excludesfile default to ~/.gitignore.”
  1. let core.excludesfile default to ~/.gitignore.Matthieu Moy, Nov 20, 2009
  2. Stefan NaeweNov 20, 2009
  3. David AguilarNov 20, 2009
  4. Let core.excludesfile default to ~/.gitexcludes.Matthieu Moy, Nov 21, 2009
  5. Let core.excludesfile default to ~/.gitexcludes.Matthieu Moy, Nov 26, 2009
  6. Michael J GruberNov 26, 2009
  7. Paolo BonziniNov 26, 2009
  8. Michael J GruberNov 26, 2009
  9. Bert WesargNov 26, 2009
  10. Michael J GruberNov 26, 2009
  11. David AguilarNov 26, 2009
  12. Junio C HamanoNov 26, 2009
  13. Nanako ShiraishiDec 30, 2009
  14. Matthieu MoyDec 30, 2009
  15. Junio C HamanoDec 30, 2009
  16. User-wide Git config directory (was Re: [PATCH v2] Let core.excludesfile default to ~/.gitexcludes.)Matthieu Moy, Jan 2, 2010
  17. Junio C HamanoNov 20, 2009

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.