def reuse

ezx@1.11.0.0 · src/ez/key.bend:58

import ezx@1.11.0.0/src/ez/key.bend as Key
import Base

58# the three fields the same, and a commit at all. An empty commit is a dirty
59# tree or a directory that is not a checkout, and those are built every time.
60def reuse(was: Stamp, now: Stamp) -> Bool:
61  match was:
62    case Stamp{+r0, +f0, +b0}:
63      match now:
64        case Stamp{+r1, +f1, +b1}:
65          Bool.and(Bool.not(String.is_empty(r1)),
66            Bool.and(String.eq(r0, r1),
67              Bool.and(String.eq(f0, f1), String.eq(b0, b1))))

Uses (6)

Used by (1)