Expand description
The workspace (spec/sync/README.md §1): the directory holding
.omgbase/, discovered by walking up like git; its repos with their
derived root paths; repo selection for a command run in some cwd.
Structs§
- RepoRow
- A repo as the workspace lists it.
- Repo
Selection - Why
select_repofound nothing:repo_not_foundwith the slugs that exist. - Workspace
- An open workspace: its root,
.omgbase/directory, database path and store.
Constants§
- DB_FILE
- The database file inside it (
spec/store§1). - OMGBASE_
DIR - The directory a workspace is recognised by.
- WORKSPACE_
ENV - The environment variable that names a workspace when no flag does.
Functions§
- find_
root - Walk up from
startto the filesystem root; the first directory holding a.omgbasedirectory is the workspace root (§1). - fs_
root_ from_ config - The
rootof anfssource’s storedconfigJSON, orNonewhen the config is unparsable, the root is not a string, or it is empty. - list_
repos - The repos of a store with their derived root paths, ordered by
slug(§1: attachments joined to sources withadapter = 'fs', the first non-empty root per repo). - select_
repo - §1 repo selection, pure over the rows: an explicit slug must exist; else
with exactly one repo, that repo; else the repos whose root path contains
cwd(sourceless repos never match) — exactly one → it; none →repo_not_found; several → the longest resolved root path.