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

Re: [PATCH (resend)] Let core.excludesfile default to ~/.gitexcludes.

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Nov 26, 2009, 13:39 UTC
Message-ID
<4B0E8529.3040609@drmicha.warpmail.net>
In-Reply-To
<36ca99e90911260501q571929e5l114cb0af9f374a98@mail.gmail.com>
Bert Wesarg venit, vidit, dixit 26.11.2009 14:01:
Show 43 quoted lines
> On Thu, Nov 26, 2009 at 13:00, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>> Matthieu Moy venit, vidit, dixit 26.11.2009 11:35:
>>> Most users will set it to ~/.gitsomething. ~/.gitignore would conflict
>>> with per-directory ignore file if ~/ is managed by Git, so ~/.gitexcludes
>>> is a sane default.
>>
>> I'm sorry to jump in so late, and this may sound like bike-shedding, but
>> right now we have
>>
>> .git/info/exclude
>> .gitignore
>>
>> and this would add
>>
>> ~/.gitexcludes
>>
>> That is, three terms, or two, where one comes in two variations
>> (exclude/exludes). I always wondered why we have two.
>>
>> The reason for .gitignore is most probably the similarity to
>> .${othervcs}ignore, and that is a valid reason.
>>
>> I know we have ~/.gitconfig for the global version of .git/config, and
>> maybe that was just no good idea either. But I don't even dare
>> suggesting to rename it ~/.gitglobalconfig.
>>
>> So, in line at least with our term "global" (per user) config, I would
>> suggest to use "~/.gitglobalignore" for the global ignore file. Maybe,
>> eventually, we'll manage to rename .git/info/excludes to .git/info/ignore.
>>
>> On a somewhat larger scale, a good alternative strategy would be to have
>> a directory "~/.gitglobal/" in which Git would look for
>> ~/.gitglobal/config and
>> ~/.gitglobal/info/ignore or
>> ~/.gitglobal/ignore
>>
>> i.e. mirroring the repo structure or at least bundling everything in a
>> single dir, which would also be a good place for a global svnauthors
>> file and such, and for other global configuration files we don't think
>> of right now.
> I would vote for that too. Its more future-proof than a single new
> file. Also I would suggest to name this dir ~/.gitrc/. 
Now, that is bike shedding ;)

It seems to me that all ~/.*rc that I have are config files (.bashrc, .xinitrc...), and all condif subdirs ~/.* are named by the program/subsystem (.qt, .kde, .gnupg), which we cannot do any more, and which is why I suggested .gitglobal. But I'd be fine with .gitrc.

> On the other
> hand the --global option to git config specifies the .gitconfig in
> your HOME.
That would have to change (ouch, ducking). Transition plan would be:
~/.gitconfig, ~/.gitrc/config::
        User-specific configuration file. Also called "global"
        configuration file. Git looks in these locations in the
	specified order and uses the first one it finds.
$(prefix)/etc/gitconfig, $(prefix)/etc/gitrc/config::
        System-wide configuration file. Git looks in these locations
	in the specified order and uses the first one it finds.

This would mean no surprises for users with existing config, one could teach the new preferred locations exclusively, and at some future point one could phase out the old paths.

Michael
Previous: Bert WesargNext: David Aguilar
Message 10 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.