Skip to main content

Module repo

Module repo 

Source
Expand description

Canonical repo resolution: every review repo maps to exactly one canonical local repo, which sync never deletes - only the worktrees/workspaces created from it. A canonical repo is either discovered (an existing checkout found by scanning Config::workdir, see crate::workdir) or tool-managed (cloned once under Paths::repo_dir() and recorded in repos.json).

Lookup order: the workdir scan cache, then the repos.json registry, then - if workdir is set - a rescan (throttled, see RepoStore::needs_rescan) in case the repo was just cloned or is newly discoverable. Still missing after all that: OnMissing decides whether to clone (always plain git - only a discovered checkout can be jj) or hand back NeedsClone for the caller to ask about first.

Structs§

CanonicalRepo
A resolved local repo that review workspaces are built from.
NeedsClone
Returned by RepoStore::resolve under OnMissing::Ask when a review’s repo has no local checkout. Callers should downcast_ref for this to offer the clone prompt, and re-resolve with OnMissing::Clone if the user agrees.
RepoListEntry
RepoStore

Enums§

OnMissing
What RepoStore::resolve should do when a review’s repo isn’t found locally.
RepoKind

Functions§

normalize_url
Normalize a clone URL so git@github.com:o/r.git, https://github.com/o/r, and ssh://git@github.com/o/r all compare equal, as host/owner/repo.