def clone.say

ezx@1.11.0.0 · src/git/exec.bend:40

import ezx@1.11.0.0/src/git/exec.bend as Exec
import Base
import ezx@1.11.0.0/src/share/say.bend as Say
import ezx@1.11.0.0/src/share/spin.bend as Spin

40# the checkout a package is taken from: the pinned commit alone, at the depth
41# of one, so a repo with a long history costs nothing to vendor. The fetch is
42# quiet; the line above it is what a person sees while it runs.
43def clone.say(+work: String, +url: String, +rev: String, +msg: String) -> IO(Unit):
44  do IO<Unit>:
45    +s : Say.Spin <- Spin.hold(msg)
46    +from : String <- anchored(url)
47    run("init", ["git", "init", "-q", work])
48    run("fetch", ["git", "-C", work, "fetch", "-q", "--depth", "1", from, rev])
49    run("checkout", ["git", "-C", work, "checkout", "-q", rev])
50    Spin.done(s)

Uses (10)

Used by (1)