def ignore.put

ezx@1.11.0.0 · src/init/plan.bend:146

import ezx@1.11.0.0/src/init/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/lock/plan.bend as P

146# `.gitignore` written ahead of the rest when it lacks a rule. Nothing to add
147# means nothing written, so an `ez init` in a directory whose ignore file
148# already has the rules leaves it exactly as it found it.
149def ignore.put(ms: List<&2, String>, +text: String, rest: List<&2, P.Effect>) -> List<&2, P.Effect>:
150  match ms:
151    case Nil{}:
152      rest
153    case Con{h, t}:
154      P.Write{ignore.file(), ignored(text, h <> t)} <> rest

Uses (5)

Used by (1)