def gone

ezx@1.11.0.0 · src/add/plan.bend:528

import ezx@1.11.0.0/src/add/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M

528# the committed tree a re-add moves off: the old hash of a vendored entry
529# when the hash moved, it is safe to remove, and nothing left names it
530def gone(+old: M.Dep, +hash: String, +left: List<&2, M.Dep>) -> List<&2, String>:
531  Bool.pick(List<&2, String>,
532    Bool.and(M.source.vendor(M.source.dep(old)),
533      Bool.and(Bool.not(String.eq(M.dep.hash(old), hash)),
534        Bool.and(safe(M.dep.hash(old)), Bool.not(holds(left, M.dep.hash(old)))))),
535    [M.dep.hash(old)], [])

Uses (12)

Used by (1)