def edits

ezx@1.11.0.0 · src/remove/plan.bend:130

import ezx@1.11.0.0/src/remove/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/lock/plan.bend as P
import ezx@1.11.0.0/src/ledger/manifest.bend as M
import ezx@1.11.0.0/src/ledger/render.bend as Rend
import ezx@1.11.0.0/src/ledger/ignore.bend as I

130# what `ez remove` does to a ledger that names the dependency: the ledger
131# written without it, the allowlist derived from what is left, and each
132# committed tree it leaves unnamed removed
133def edits(+led: M.Manifest, +name: String, +ignore: String) -> List<&2, P.Effect>:
134  +left = deps.of(Rend.remove(led, name))
135  +next = I.sync(left, ignore)
136  P.Write{toml(), Rend.show(Rend.remove(led, name))} <>
137    ignore.put(String.eq(next, ignore), next,
138      P.drops.of(gone(deps.of(led), name, left), []))

Uses (13)

Used by (1)