def git.rule

ezx@1.11.0.0 · src/lock/world.bend:260

import ezx@1.11.0.0/src/lock/world.bend as World
import Base
import ezx@1.11.0.0/src/lock/lock.bend as L
import ezx@1.11.0.0/src/pkg/pkg.bend as K

260# a git package's bytes under the rule its name was taken by. Since bend
261# 2.0.27 a package holds the LICENSE files beside its sources, and the walk
262# takes them along. A ledger written before names the same checkout without
263# them, and that package is the checkout's too: when the walk's manifest does
264# not hash to the name, the package without its LICENSE files is judged
265# instead, and locked when that is the one the name is the digest of.
266def git.rule(named: Bool, +hash: String, +manifest: String, +ss: List<&2, String>) -> Verdict:
267  match named:
268    case True{}:
269      git.body(List.is_empty(&2, K.Item, L.manifest.files(String.lines(manifest))),
270        hash, manifest, ss)
271    case False{}:
272      +fs = L.manifest.files(String.lines(manifest))
273      +bs = K.bare(fs)
274      git.body(List.is_empty(&2, K.Item, bs), hash, K.manifest.lines(bs),
275        K.bare.srcs(fs, ss))

Uses (12)

Used by (1)