def pin.same

ezx@1.11.0.0 · src/ws/joint.bend:271

import ezx@1.11.0.0/src/ws/joint.bend as Joint
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M

271# whether two git sources are pinned alike: one commit and one tag
272def pin.same(aa: M.Source, bb: M.Source) -> Bool:
273  match aa:
274    case M.Hub{_an}:
275      True{}
276    case M.Git{_au, ar, at, _ao, _an, _av}:
277      match bb:
278        case M.Hub{_bn}:
279          True{}
280        case M.Git{_bu, br, bt, _bo, _bn, _bv}:
281          Bool.and(String.eq(ar, br), String.eq(at, bt))
282        case M.Member{_bp, _bm}:
283          True{}
284    case M.Member{_ap, _am}:
285      True{}

Uses (4)

Used by (2)