Up.anchor: def of ezx@1.13.0.0 Import: import ezx@1.13.0.0/src/lock/up.bend as Up Lines 81-107 of ezx@1.13.0.0/src/lock/up.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.13.0.0/src/lock/up.bend&start_line=81&end_line=107 import Base import ezx@1.13.0.0/src/pkg/path.bend as Path # a question as git is to be asked it: the source it names anchored at the # directory `here` (`Path.anchor`), so a relative path, which the ledger keeps # relative to the project, is read from the project wherever git runs. A URL # and an absolute path are as they are, and a question that names no source # is as it is. def anchor(+here: String, ask: Ask) -> Ask: match ask: case Refs{url, ref}: Refs{Path.anchor(here, url), ref} case Head{url}: Head{Path.anchor(here, url)} case Tags{url}: Tags{Path.anchor(here, url)} case Above{url, pin, tip}: Above{Path.anchor(here, url), pin, tip} case Tree{url, rev, entry}: Tree{Path.anchor(here, url), rev, entry} case Weigh{url, rev}: Weigh{Path.anchor(here, url), rev} case HubHas{hub, hash}: HubHas{hub, hash} case Ignore{}: Ignore{} case Sources{}: Sources{} case Clone{url, rev}: Clone{Path.anchor(here, url), rev} Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=ezx@1.13.0.0/src/lock/up.bend&name=Ask https://jend.leeeet.dev/definition.txt?path=ezx@1.13.0.0/src/pkg/path.bend&name=anchor