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

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
Previous: D. Ben KnobleNext: Phillip Wood
Message 2 of 10 in “dir: use per-worktree repository ignore patterns upon request”
  1. dir: use per-worktree repository ignore patterns upon requestD. Ben Knoble, Apr 24, 2026
  2. brian m. carlsonApr 24, 2026
  3. Phillip WoodApr 24, 2026
  4. Junio C HamanoApr 25, 2026
  5. ignore: note info/exclude lives in GIT_COMMON_DIR, not GIT_DIRD. Ben Knoble, May 8, 2026
  6. brian m. carlsonMay 9, 2026
  7. Phillip WoodMay 11, 2026
  8. D. Ben KnobleMay 11, 2026
  9. ignore: note info/exclude lives in GIT_COMMON_DIR, not GIT_DIRD. Ben Knoble, May 12, 2026
  10. Phillip WoodMay 13, 2026

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.