def gap.git

ezx@1.11.0.0 · src/share/pin.bend:8

import ezx@1.11.0.0/src/share/pin.bend as Pin
import Base

8# why a plain lock cannot copy a git pin as it stands, or "" when it can. The
9# lock copies `rev` and `narHash` out of the ledger and never asks a remote
10# for them, so a pin missing either is refused rather than filled, and the
11# upgrade that fills it is named.
12def gap.git(no_rev: Bool, no_nar: Bool, +name: String) -> String:
13  match no_rev:
14    case True{}:
15      "ez: tools." ++ name ++ " has no rev; run `ez lock --upgrade --package " ++
16        name ++ "` to pin it"
17    case False{}:
18      match no_nar:
19        case True{}:
20          "ez: tools." ++ name ++ " has no narHash; run `ez lock --upgrade --package " ++
21            name ++ "` to pin it"
22        case False{}:
23          ""

Uses (3)

Used by (1)