@feigi/fleet-ctl 3.109.0 → 3.109.1
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 +5 -4
- package/scripts/no-undo-audit.sh +20 -18
package/package.json
CHANGED
|
@@ -319,10 +319,11 @@ function originMain(root, env) {
|
|
|
319
319
|
* A failed ancestry read is followed by `git rev-parse -q --verify B^{commit}`.
|
|
320
320
|
* Only exit 1 with nothing on stderr is the missing answer: that is what an
|
|
321
321
|
* absent commit gives. Exit 1 with anything on stderr means git could not
|
|
322
|
-
* settle absence — an unopenable loose object
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
322
|
+
* settle absence — an unopenable loose object (git <= 2.55; git >= 2.56 exits
|
|
323
|
+
* 128 for it, which is the "anything else" below), a broken alternate, an
|
|
324
|
+
* object that is not a commit, or output unrelated to the object such as
|
|
325
|
+
* GIT_TRACE's — and that read's own failure is returned, so `why` carries what
|
|
326
|
+
* git printed. Anything else, a corrupt object's exit 128 included, keeps the
|
|
326
327
|
* ancestry failure.
|
|
327
328
|
*/
|
|
328
329
|
function headMove(root, env, was, now) {
|
package/scripts/no-undo-audit.sh
CHANGED
|
@@ -635,12 +635,12 @@ fi
|
|
|
635
635
|
#
|
|
636
636
|
# The count above is only honest when the list can be trusted, and it cannot
|
|
637
637
|
# always be. `git stash list` prints nothing at rc 0 for a reflog this process
|
|
638
|
-
# cannot read (`chmod 000 .git/logs/refs/stash`), nothing at rc 1
|
|
639
|
-
#
|
|
640
|
-
#
|
|
641
|
-
# .git/refs/stash`) — all measured,
|
|
642
|
-
# empty stash by the list alone, while
|
|
643
|
-
# nothing to look at.
|
|
638
|
+
# cannot read (`chmod 000 .git/logs/refs/stash`), nothing at a nonzero rc — 1 on
|
|
639
|
+
# git <= 2.55, 128 on git >= 2.56 — for a stash ref whose object is gone
|
|
640
|
+
# (`fatal: bad object refs/stash`), and nothing at rc 0 again for a `refs/stash`
|
|
641
|
+
# FILE this process cannot read (`chmod 000 .git/refs/stash`) — all measured,
|
|
642
|
+
# and none distinguishable from a genuinely empty stash by the list alone, while
|
|
643
|
+
# `0` is the one value the runbook reads as nothing to look at.
|
|
644
644
|
#
|
|
645
645
|
# `show-ref` is the discriminator because its exit code separates "no such ref"
|
|
646
646
|
# from "could not read the ref". Measured, git 2.50.1:
|
|
@@ -714,11 +714,12 @@ fi
|
|
|
714
714
|
# A corrupt loose object behind a NON-TIP entry is one shape of that ceiling,
|
|
715
715
|
# and it is not one, because git is loud about it. The reflog there is
|
|
716
716
|
# intact, so `stash list` resolves the ref, prints the entries it could read,
|
|
717
|
-
# says `fatal: loose object ... is corrupt` and exits
|
|
718
|
-
#
|
|
719
|
-
#
|
|
720
|
-
#
|
|
721
|
-
#
|
|
717
|
+
# says `fatal: loose object ... is corrupt` and exits nonzero — 1 on git <= 2.55,
|
|
718
|
+
# 128 on git >= 2.56; nothing below reads which — a nonempty list at a nonzero
|
|
719
|
+
# rc, a shape none of the rows above has, so `show-ref` agrees with the ref and
|
|
720
|
+
# the cross-check has nothing to disagree with. The rc is the only signal, which
|
|
721
|
+
# is why the list is captured rather than piped: `| wc -l` made this statement's
|
|
722
|
+
# status `wc`'s, always 0, and git's own rc unrecoverable.
|
|
722
723
|
# Nothing else moves — the count is still the lines the list printed, its stderr
|
|
723
724
|
# is still dropped here, and a list that succeeds is still read as a count.
|
|
724
725
|
#
|
|
@@ -771,7 +772,7 @@ if [ "$stash" = 0 ] && [ "$sr_rc" = 1 ]; then
|
|
|
771
772
|
fi
|
|
772
773
|
# Two ways to the same answer, and each names its own state. The empty-list
|
|
773
774
|
# states are asked first and keep the sentence they already print, because a
|
|
774
|
-
# corrupt TIP object satisfies both tests (empty list, rc
|
|
775
|
+
# corrupt TIP object satisfies both tests (empty list, nonzero rc, `show-ref` rc 0)
|
|
775
776
|
# and `refs/stash` is what is wrong with it — the sentence below is about the
|
|
776
777
|
# ref, and it is the more specific of the two there. What is left for the rc is
|
|
777
778
|
# the state no cross-check can reach: git printed entries and then said it could
|
|
@@ -812,17 +813,18 @@ if [ -n "$msg" ]; then
|
|
|
812
813
|
#
|
|
813
814
|
# `2>&1 >/dev/null` in that order captures stderr and drops stdout — the list
|
|
814
815
|
# itself is not wanted, it was already counted. `|| true` is load-bearing
|
|
815
|
-
# under `set -e`: git exits
|
|
816
|
+
# under `set -e`: git exits nonzero in exactly the state this exists for, and an
|
|
816
817
|
# unguarded substitution would abort the audit before it emits a payload,
|
|
817
818
|
# turning a report into a refusal.
|
|
818
819
|
#
|
|
819
820
|
# `tr` because `$diag` is not one line. A stash object that is CORRUPT
|
|
820
821
|
# rather than missing (`echo junk > .git/objects/<xx>/<rest>`) reaches this
|
|
821
|
-
# same branch — list empty at rc 1
|
|
822
|
-
# lines, 10 with a bad
|
|
823
|
-
# column 0 in the audit's
|
|
824
|
-
# step headers belong. `$()`
|
|
825
|
-
#
|
|
822
|
+
# same branch — list empty at rc 1 on git <= 2.55 and rc 128 on git >= 2.56,
|
|
823
|
+
# show-ref rc 0 — and git says it in 7 lines, 10 with a bad
|
|
824
|
+
# `objects/info/alternates`. Unfolded they land at column 0 in the audit's
|
|
825
|
+
# stderr, which is where only its own `$ git ...` step headers belong. `$()`
|
|
826
|
+
# has already stripped the trailing newline, so the fold adds no trailing
|
|
827
|
+
# space and the silent states still append nothing.
|
|
826
828
|
#
|
|
827
829
|
# `printf`, not `echo`: `$msg` now carries git's text under `#!/bin/sh`, and
|
|
828
830
|
# both dash and macOS sh expand escapes in an `echo` operand — a `\c` in it
|