@@ -68,15 +68,18 @@ a path wins. For directories:
6868
69691 . ** Built-in skip list** — ` .git ` , ` node_modules ` , ` dist ` , ` target ` ,
7070 ` vendor ` , tool caches, etc. (60+ names; the fast/moderate index modes add
71- more, e.g. ` docs ` , ` examples ` , ` testdata ` ). Not overridable from any
72- ignore file today.
71+ more, e.g. ` docs ` , ` examples ` , ` testdata ` ). A ` .cbmignore ` negation
72+ (for example ` !target/ ` ) can un-skip these directories, except the
73+ non-negatable safety core: ` .git ` , ` node_modules ` , ` .worktrees ` , and
74+ ` .claude-worktrees ` .
73752 . ** Repo ` .gitignore ` ** — ` <repo>/.gitignore ` merged with
7476 ` <git-common-dir>/info/exclude ` (worktree-aware); later patterns win on
7577 conflict. Honored even when the indexed directory is not a git repo root.
76783 . ** Nested ` .gitignore ` files** — picked up during the walk and matched
7779 relative to their own directory.
78804 . ** ` .cbmignore ` ** — a positive match skips the path; a negated match can
79- only rescue paths from layer 5.
81+ un-skip built-in skip dirs from layer 1 (except the safety core) and can
82+ also rescue paths from layer 5.
80835 . ** Git global excludes** — ` core.excludesFile ` from ` ~/.gitconfig ` or the
8184 XDG git config (default ` $XDG_CONFIG_HOME/git/ignore ` ); consulted only
8285 when the project is a git repo with a config.
@@ -97,25 +100,16 @@ always skipped.
97100 directory is excluded. Negate the directory itself if you need its
98101 contents.
99102- ** Across layers** : a ` .cbmignore ` negation overrides the ** git global
100- excludes** layer only. Example: your ` ~/.config/git/ignore ` ignores
101- ` *.sql ` , but this project's SQL should be indexed — add ` !*.sql ` to
102- ` .cbmignore ` . Negation cannot override the built-in skip lists, the repo
103- ` .gitignore ` /` info/exclude ` , nested ` .gitignore ` files, the built-in
104- suffix/filename filters, or the size cap.
105-
106- ### Planned (not yet implemented)
107-
108- The negation story is being unified; none of the following works yet:
109-
110- - ` ! ` in ` .cbmignore ` will be able to un-skip ordinary built-in skip
111- directories (` obj/ ` , ` dist/ ` , ` target/ ` , …) so build-output-like
112- directories that actually contain source can be indexed.
113- - A small safety core stays non-negatable by design — ` .git ` ,
114- ` node_modules ` , and worktree-internal directories — because indexing them
115- risks OOM and correctness issues (see issue #489 ).
103+ excludes** layer and can also un-skip ordinary built-in skip directories.
104+ Example: your ` ~/.config/git/ignore ` ignores ` *.sql ` , but this project's
105+ SQL should be indexed — add ` !*.sql ` to ` .cbmignore ` . Negation still cannot
106+ override the safety core built-in dirs (` .git ` , ` node_modules ` ,
107+ ` .worktrees ` , ` .claude-worktrees ` ), the repo ` .gitignore ` /` info/exclude ` ,
108+ nested ` .gitignore ` files, the built-in suffix/filename filters, or the
109+ size cap.
110+
111+ ### Planned follow-up
112+
116113- Auxiliary filesystem walkers will honor the same ignore predicate as
117114 discovery, so every code path sees an identical ignore decision
118115 (unification tracked in a follow-up issue).
119-
120- Until these land, the "Precedence" and "Negation — current behavior" sections
121- above describe the actual behavior.
0 commit comments