Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectGitInfo ¶ added in v0.2.4
DetectGitInfo reads the origin remote of an existing repository, so that a project registered from a directory carries the same Git metadata as one that devvault cloned itself. Those fields are what `devvault doctor` derives its Git host reachability check from — without them the check silently disappears instead of failing.
A directory that is not a Git repository, or a repository without an origin remote, is not an error: such a project is registered without Git metadata. Only an unexpected failure is reported back.
func GitInfoFrom ¶ added in v0.2.4
GitInfoFrom converts parsed remote metadata into the registry's shape.
Every path that registers a project stores exactly these fields, and internal/doctor builds its Git host checks from them, so the mapping lives in one place instead of once per call site.
func ResolveBaseDir ¶ added in v0.7.0
ResolveBaseDir turns a --base-dir value into the absolute directory devvault keeps cloned repositories in: the value itself, with a leading `~/` expanded, and ~/DevVault when nothing was given.
It is exported because `devvault registry import` looks for the directories of an exported registry in the same place `devvault clone` puts them. Two copies of "~/DevVault" would drift apart the first time either side gains a flag, and the import would then search a directory clone never writes to.
Types ¶
type CloneOptions ¶
type CloneResult ¶
func CloneAndPrepare ¶
func CloneAndPrepare(ctx context.Context, opts CloneOptions) (CloneResult, error)