def source.back

ezx@1.11.0.0 · src/ws/up.bend:32

import ezx@1.11.0.0/src/ws/up.bend as Up
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M

32# a source with the pin the joint ledger now gives it: the joint's commit,
33# tag, root and narHash, and this ledger's own url and vendor bit
34def source.back(own: M.Source, joint: M.Source) -> M.Source:
35  match own:
36    case M.Hub{nv}:
37      M.Hub{nv}
38    case M.Git{url, _rev, _tag, _root, _nar, vend}:
39      match joint:
40        case M.Hub{_jn}:
41          M.Git{url, _rev, _tag, _root, _nar, vend}
42        case M.Git{_ju, jr, jt, jo, jn, _jv}:
43          M.Git{url, jr, jt, jo, jn, vend}
44        case M.Member{_jp, _jm}:
45          M.Git{url, _rev, _tag, _root, _nar, vend}
46    case M.Member{path, named}:
47      M.Member{path, named}

Uses (1)

Used by (2)