On Thu, Oct 3, 2024 at 11:40 AM Junio C Hamano <gitster@xxxxxxxxx> wrote: > If you take the reasoning one step further [*], it may make sense to > have a list of ignored patterns that applies to everybody on the > system, regardless of who they are, what editor they use, and what > project they work on. > > Having said all that, wouldn't that be already supported? What > prevents you to set core.excludesFile in /etc/gitconfig? I tried to cover this in my original email. You can set that and it will apply to all users who haven't set up their own core.excludesFile. But this has two problems. 1. It will disable the default behavior of a user being able to put their own ignore rules in $XDG_CONFIG_HOME/git/ignore which I suspect more than a few current git users rely on. 2. As soon as a user sets core.excludesFile in their account-level config, to be able to create account-level ignore rules, such as based on their desktop environment or editor or all the other stuff people typically want to put in their excludesFile, they will lose the functionality provided by the system level ignore file. > * This may be a larger step though, as the set of projects that a > single user works on is much narrower than the set of projects > that any users on the same system work on (hence the types of > files that are potentially tracked by these projects are much > wider for system-wide exclude list to take into consideration). I agree that these two scopes are very different, and that's why I want to be able to set them both! ~Every user on a macOS computer (which might be a few on a family desktop, and was dozens last time I managed a macOS server) wants to ignore `.DS_Store`, `.AppleDouble`, and `.LSOverride` in ~every repo they work on. > On the other hand, are massively multi-user systems (like the > time-shared system studends 30-years ago used at Universities) > still a thing? If not, then having a pattern that may hurt > people with other preference on the system-wide list would not be > a problem at all---after all, you have the entire system without > anybody else. But at that point, system-wide and per-user would > become the same thing ;-) That's not quite true even on single-user computers. It's pretty common that one user might run things as their user account or as root. It's less common but not unheard of for one user to have multiple accounts (e.g. one for work and one for not work) or for non-user accounts to perform git operations.