Re: [PATCH] dir: use per-worktree repository ignore patterns upon request
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Apr 24, 2026, 19:35 UTC
- Message-ID
- <aevGF3z5VtQLxJm3@fruit.crustytoothpaste.net>
- In-Reply-To
- <e3ee0a11b566dd2cc605447c111ae4620bce0fe6.1777050300.git.ben.knoble+github@gmail.com>
On 2026-04-24 at 17:09:19, D. Ben Knoble wrote:
Show 10 quoted lines
> 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; instead, secondary worktrees also > use $GIT_COMMON_DIR/info/exclude. > > Some users may prefer each worktree use its own ignore file; some may > prefer both; some may prefer the current behavior. > > Add, test, and document extensions.worktreeIgnore that controls which > set of ignore files to use for worktrees.
I was wondering if we could make something like `extensions.worktreeInfoFiles` or something and also make the `info/attributes` (and maybe `info/sparse-checkout`) file used instead. I think that would be somewhat better than having additional options added on after the fact and be a little more generally applicable.
What do you think? My apologies for not mentioning this sooner before you'd already sent a patch.
-- brian m. carlson (they/them) Toronto, Ontario, CA