def anchor
ezx@1.11.0.0 · src/lock/up.bend:81
import ezx@1.11.0.0/src/lock/up.bend as Up
import Base
import ezx@1.11.0.0/src/pkg/path.bend as Path
81
82
83
84
85
86def anchor(+here: String, ask: Ask) -> Ask:
87 match ask:
88 case Refs{url, ref}:
89 Refs{Path.anchor(here, url), ref}
90 case Head{url}:
91 Head{Path.anchor(here, url)}
92 case Tags{url}:
93 Tags{Path.anchor(here, url)}
94 case Above{url, pin, tip}:
95 Above{Path.anchor(here, url), pin, tip}
96 case Tree{url, rev, entry}:
97 Tree{Path.anchor(here, url), rev, entry}
98 case Weigh{url, rev}:
99 Weigh{Path.anchor(here, url), rev}
100 case HubHas{hub, hash}:
101 HubHas{hub, hash}
102 case Ignore{}:
103 Ignore{}
104 case Sources{}:
105 Sources{}
106 case Clone{url, rev}:
107 Clone{Path.anchor(here, url), rev}