Files
reims-vgpu/scripts/internal/new-worktree.sh
Anees Iqbal dae3e6b13d 🔥 Delete the behaviour-lock suite and its make targets
The suite drove apple-gfx's C API as QEMU did and recorded what the paravirt
device did; the owner's ruling deletes apple-gfx and everything of it, the
suite with it, so make test, bless and coverage go too.

Its shader fixtures are the platforms', the graphics device's and the guest
bundle's tests too: they move to tests/shaders. guest/bundle's Makefile, an
input of the prebuilt kexts, still names tests/suite/fixtures/shaders, which
stays as a link to tests/shaders until the kexts are next built. A worktree
no longer clones the suite's 257 MiB, so new-worktree.sh adds it plainly.
2026-11-07 18:21:42 -08:00

18 lines
967 B
Bash
Executable File

#!/bin/bash
# A new worktree on a new branch. Its builds run in its own target/ (no CARGO_TARGET_DIR), in the
# environment of scripts/internal/dev-env.sh, which builds through kache where it is installed
# (docs/development.md).
#
# scripts/internal/new-worktree.sh PATH BRANCH [START]
#
# BRANCH is a new branch at START (default: the main checkout's HEAD). The worktree is added from
# the main checkout: a new worktree takes the sparse-checkout settings of the one it is added from.
set -euo pipefail
[[ $# -ge 2 ]] || { echo "usage: scripts/internal/new-worktree.sh PATH BRANCH [START]" >&2; exit 2; }
path=$1 branch=$2
main=$(git worktree list --porcelain | sed -n '1s/^worktree //p')
start=${3:-$(git -C "$main" rev-parse HEAD)}
[[ ! -e $path ]] || { echo "new-worktree: $path exists" >&2; exit 1; }
git -C "$main" worktree add -q -b "$branch" "$path" "$start"
echo "new-worktree: $(cd "$path" && pwd) on $branch at $(git -C "$path" rev-parse --short HEAD)"