@feigi/fleet-ctl 3.74.1 → 3.74.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/main-checkout.mjs +10 -1
package/package.json
CHANGED
|
@@ -141,11 +141,20 @@ const die = makeDie(NAME);
|
|
|
141
141
|
|
|
142
142
|
// The one git primitive. `gitEnv()` drops an ambient GIT_DIR/GIT_WORK_TREE
|
|
143
143
|
// and LC_ALL=C keeps a failure's last line readable as git wrote it.
|
|
144
|
+
// GIT_NO_LAZY_FETCH=1: this check is a local read-only backstop, so it never
|
|
145
|
+
// reaches the network. In a partial clone a missing baseline commit then
|
|
146
|
+
// answers `missing` instead of being fetched from the promisor remote; with
|
|
147
|
+
// lazy fetch on, the ancestry read fetches it and answers `moved`, and a
|
|
148
|
+
// fetch that fails in the `merge-base` call but succeeds in the `rev-parse`
|
|
149
|
+
// probe turns `missing` into `read`. Git before 2.45 ignores the variable and
|
|
150
|
+
// still lazy-fetches; that is accepted, not fixed — the `--no-lazy-fetch` flag
|
|
151
|
+
// would instead fail every call there, since such a git rejects it as an
|
|
152
|
+
// unknown option.
|
|
144
153
|
// `what` names the call in a failure, since `why` is printed to the operator.
|
|
145
154
|
function git(what, args, cwd, env) {
|
|
146
155
|
const r = spawnSync("git", args, {
|
|
147
156
|
cwd, encoding: "utf8", maxBuffer: MAX_BUFFER, timeout: GIT_TIMEOUT_MS,
|
|
148
|
-
env: gitEnv({ LC_ALL: "C" }, env),
|
|
157
|
+
env: gitEnv({ LC_ALL: "C", GIT_NO_LAZY_FETCH: "1" }, env),
|
|
149
158
|
});
|
|
150
159
|
if (!r.error && r.status === 0) return { ok: true, stdout: r.stdout };
|
|
151
160
|
if (r.error) return { ok: false, why: `${what} did not run: ${r.error.code ?? r.error.message}`, status: null };
|