Skip to content

Fix Open Knowledge Desktop offering to set up a project inside a…#337

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jun 26, 2026
Merged

Fix Open Knowledge Desktop offering to set up a project inside a…#337
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Fix Open Knowledge Desktop offering to set up a project inside a subfolder of a linked git worktree. Picking a subdirectory (for example public/open-knowledge) inside a git worktree add checkout misclassified it as a worktree root and showed "Setup Open Knowledge in this folder" in place, scaffolding .ok/ in the subfolder instead of promoting to the git root. Subfolders of a linked worktree now correctly fall through to git-root promotion; only the worktree root itself is treated as a standalone project.

…ject root (#2204)

discoverProject's linked-worktree carveout used resolveGitDirDetailed, which
walks up to the worktree root's .git pointer when the picked path has no .git
of its own. A subfolder of a linked worktree therefore resolved to kind
'linked' and short-circuited to in-place Setup, scaffolding .ok/ inside the
subfolder instead of promoting to the git root. Guard the carveout on
projectSubPath === '' so it fires only when the picked path IS the worktree
root; subfolders fall through to the ancestor-walk and git-root promotion.

Adds a regression test for the subfolder case (RED before the fix) and one
pinning that the worktree root still classifies standalone under an ancestor
.ok/.

GitOrigin-RevId: f16356c3a59f9a0939565c9a86678c47b94f1e61

@inkeep-internal-ci inkeep-internal-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28268055689). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.

@inkeep-oss-sync
inkeep-oss-sync Bot merged commit df6dbd9 into main Jun 26, 2026
1 check passed
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch June 26, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant