From: Sparr <sparr0@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>, git@vger.kernel.org
Subject: Re: Lack of system-level excludesFile
Date: Thu, 3 Oct 2024 13:45:07 -0400 [thread overview]
Message-ID: <CANp3UNB_4_mcK4CV3WF7p3AWaLTK6qb13tS3imDBGU5XBOzG0A@mail.gmail.com> (raw)
In-Reply-To: <xmqq34ldjiup.fsf@gitster.g>
On Thu, Oct 3, 2024 at 11:40 AM Junio C Hamano <gitster@pobox.com> 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.
next prev parent reply other threads:[~2024-10-03 17:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CANp3UNBGd=jiSZyFSAdPjayvgHbP5SF4Dm-uCNwna_H16bRgRA@mail.gmail.com>
2024-10-03 0:23 ` Lack of system-level excludesFile Sparr
2024-10-03 8:15 ` brian m. carlson
2024-10-03 15:39 ` Junio C Hamano
2024-10-03 17:45 ` Sparr [this message]
2024-10-03 21:24 ` Jeff King
2024-10-03 21:55 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANp3UNB_4_mcK4CV3WF7p3AWaLTK6qb13tS3imDBGU5XBOzG0A@mail.gmail.com \
--to=sparr0@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).