You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7648f9d
Browse filesBrowse the repository at this point in the historyBrowse files
feat(config): opt-in worktree_shared_index — one index per repository across worktrees
For workflows where the main checkout is only the repository's origin and is
never kept current (every branch lives in its own linked worktree), a family
view of the main checkout is stale by construction. Add an opt-in switch,
`worktree_shared_index` (default false, also CBM_WORKTREE_SHARED_INDEX=1 so
supervised index workers inherit it): cbm_project_name_from_path() then names
a linked worktree after its main checkout, so every worktree of a repository
resolves to ONE index. Index once in any worktree; sessions in sibling
worktrees derive the same project and are "already indexed"; index_repository
from another worktree relinks root_path, so the index follows the last
worktree that indexed it and the watcher keeps it in sync from the active
session's worktree. Off by default: nothing changes for existing users.
Refs DeusData#573
Signed-off-by: sinterqlaas2 <[email protected]>
Copy file name to clipboardExpand all lines: docs/CONFIGURATION.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,7 @@ Current keys:
88
88
|`auto_index`|`false`| Automatically index new projects when an MCP session starts. |
89
89
|`auto_index_limit`|`50000`| Maximum file count allowed for automatic indexing of a new project. |
90
90
|`auto_watch`|`true`| Register the session's project with the background git watcher on connect. Set `false` to keep a session from registering its project (the watcher still runs for other projects). |
91
+
|`worktree_shared_index`|`false`| Name linked git worktrees after their main checkout, so every worktree of a repository resolves to **one** index: index once in any worktree, and sessions in sibling worktrees find it. The index follows whichever worktree last indexed it (the watcher keeps it in sync from the active session's worktree), so results reflect that worktree's branch. Off by default: each worktree keeps its own path-derived project. When off, an un-indexed worktree still resolves to its main checkout's index if that one is indexed. Also honoured as the `CBM_WORKTREE_SHARED_INDEX=1` environment variable. |
91
92
|`watcher_enabled`|`true`| Master switch for the background watcher subsystem. Set `false` to stop the watcher from starting at all — no poll thread and no project registration. Reindex manually with `index_repository` when disabled. |
92
93
93
94
> **`watcher_enabled` vs `auto_watch`.**`watcher_enabled` controls whether the
0 commit comments