MCPcopy Create free account
hub / github.com/acoyfellow/cloudbox / buildCloneCommand

Function buildCloneCommand

runner/server.mjs:66–71  ·  view source on GitHub ↗
(input, options = normalizeCloneOptions(input))

Source from the content-addressed store, hash-verified

64}
65
66export function buildCloneCommand(input, options = normalizeCloneOptions(input)) {
67 const ref = typeof input.ref === "string" && input.ref ? ` --branch ${shell(input.ref)}` : "";
68 const filter = options.strategy === "blobless" ? " --filter=blob:none" : "";
69 const sparse = options.sparse.length ? " --sparse --no-checkout" : "";
70 return `git clone --depth=1${filter}${sparse}${ref} ${shell(cloneUrl(input.repo, input.auth))} repo`;
71}
72
73function run(cmd, cwd, timeoutMs = MAX_TIMEOUT_MS) {
74 return new Promise((resolveRun) => {

Callers 2

handleRunFunction · 0.85

Calls 3

normalizeCloneOptionsFunction · 0.85
cloneUrlFunction · 0.85
shellFunction · 0.70

Tested by

no test coverage detected