salvage 2026-11-06: uncommitted work from scratch/darkwing-scratch/r162/wt (disk cleanup #824)

This commit is contained in:
mos committed 2026-11-06 10:04:13 -06:00
1 parent cfde62f9ff
commit 1e92e2dc33
5 files changed
+1601 -42

No files matched your search

+12 -5
View File
@@ -31,15 +31,20 @@ COPY_PATHS=(
# Whole directory: every in-repo plug-in module ships with the copy (row 131).
packages/plugins
)
# stack-release.sh sources this file and calls reachable before an activate (D1).
reachable() {
local ref
for ref in refs/heads/refactor refs/remotes/origin/refactor; do
git -C "$REPO" rev-parse --verify --quiet "$ref^{commit}" >/dev/null || die "no $ref in $REPO"
git -C "$REPO" merge-base --is-ancestor "$1" "$ref" || die "refusing: $1 is not reachable from $ref"
done
}
copy_commit() {
[ -d "$REPO/.git" ] || [ "$ALLOW_WORKTREE" = 1 ] || die "refusing: $REPO is not the canonical checkout (its .git is not a directory); run copy from the canonical checkout"
[[ "$ID" =~ ^[A-Za-z0-9][A-Za-z0-9._/-]*$ ]] || die "commit must be a commit id or branch name: $ID"
local full ref target tmp
local full target tmp
full="$(git -C "$REPO" rev-parse --verify --quiet "$ID^{commit}")" || die "not a commit: $ID"
for ref in refs/heads/refactor refs/remotes/origin/refactor; do
git -C "$REPO" rev-parse --verify --quiet "$ref^{commit}" >/dev/null || die "no $ref in $REPO"
git -C "$REPO" merge-base --is-ancestor "$full" "$ref" || die "refusing: $full is not reachable from $ref"
done
reachable "$full"
target="$COPIES/$full"
[ ! -L "$target" ] || die "refusing: copy target is a symlink: $target"
if [ -e "$target" ]; then echo "exists: $target"; return; fi
@@ -96,6 +101,8 @@ check() {
printf 'bus: %s\nConsole: %s\nCLI: %s\n' "$bus" "$console" "$cli"
[[ "$bus" == "$COPIES/"* ]] && [[ "${bus#"$COPIES/"}" =~ ^[0-9a-f]{40}$ ]] && [ -f "$bus/scripts/mosaic" ] && [ "$bus" = "$console" ] && [ "$bus" = "$cli" ]
}
# Sourced (stack-release.sh): define the functions, run nothing.
[ "${BASH_SOURCE[0]}" = "$0" ] || return 0
[ $# -gt 0 ] || usage
CMD="$1";shift
case "$CMD" in