From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: Git <git@vger.kernel.org>
Subject: Re: Advice on per-worktree private gitignore?
Date: Thu, 23 Apr 2026 21:56:54 +0000 [thread overview]
Message-ID: <aeqVpjPSyyvHDLWR@fruit.crustytoothpaste.net> (raw)
In-Reply-To: <CALnO6CCXmA+ATT7CuyWkU6P8qmLCCpMi5Ppr1c78s0heznpVyw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
On 2026-04-23 at 21:26:05, D. Ben Knoble wrote:
> Today we have $GIT_DIR/info/exclude for the main worktree, but $(git
> rev-parse --git-dir)/info/exclude for secondary worktrees does not
> actually contribute to ignore specs.
>
> Is this a "we never got around to implementing that", an intentional
> omission, or something else? Since --git-dir is described as parsing
> $GIT_DIR, I would naturally combine that with the gitignore(1) manual
> to think that the worktree.git/info/exclude should work.
>
> (Currently it seems that main-worktree/.git/info/exclude applies to
> all worktrees, which may not be desirable in some circumstances.)
I'm not aware of it being an intentional omission. I think what you
want might be useful in some circumstances, but there also might be
circumstances where it's not wanted and the user might want the settings
in the main worktree to be used everywhere.
So I'd say that we could add it as an optional extension, like
`extensions.worktreeConfig`.
--
brian m. carlson (they/them)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 325 bytes --]
prev parent reply other threads:[~2026-04-23 21:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 21:26 Advice on per-worktree private gitignore? D. Ben Knoble
2026-04-23 21:56 ` brian m. carlson [this message]
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=aeqVpjPSyyvHDLWR@fruit.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
/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