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

Re: Lack of system-level excludesFile

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Oct 3, 2024, 08:15 UTC
Message-ID
<Zv5SpewqUmlvhOl-@tapette.crustytoothpaste.net>
In-Reply-To
<CANp3UNCXqLJmAj2Vc7jB+i9qRjfKzrri_Mr9VvG4J5tUR-1HeQ@mail.gmail.com>
On 2024-10-03 at 00:23:17, Sparr wrote:
> Was the decision to not allow or implement such a file intentional, or
> is it just an emergent property of the way the config system works and
> how core.excludesFile was implemented? Would an implementation of a
> new feature supporting this sort of thing be worth discussing?

I wasn't part of the project when the exclude functionality was implemented, so I can't say what the intent was, but I will note that even CVS had ignore files. My guess is that it wasn't seen as something useful to implement, so nobody implemented it, but I think your argument for doing so isn't bad.

I'll just note that typically I ignore things in the global include which are likely to affect the environment I use, including my editor and operating system. So when I was tutoring an Emacs user, we configured his machine to ignore `*~`, since his editor creates backup files, and likewise, if I were still using macOS, I'd ignore `.DS_Store`.

So basically, I think such a feature could be useful, but I also don't see it as immediately necessary because the global (per-user) file is also generally useful for this if the user is aware enough to know it exists (which I admit they might not be). One thing I would request is that if you add this, you add an appropriate var to `git var` so that people can find the location, which is important because different versions of Git (say, Apple's vs. Homebrew's) may install the system configuration in different locations.

-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
Previous: SparrNext: Junio C Hamano
Message 2 of 6 in “Lack of system-level excludesFile”
  1. SparrOct 3, 2024
  2. brian m. carlsonOct 3, 2024
  3. Junio C HamanoOct 3, 2024
  4. SparrOct 3, 2024
  5. Jeff KingOct 3, 2024
  6. Junio C HamanoOct 3, 2024

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.