Files
2026-10-18 15:22:02 -05:00

17 lines
1012 B
Bash
Executable File

#!/usr/bin/env bash
# Row 125 r3 step 1 (no tests): a detached worktree wt3 at BASE (post-164 HEAD), with r2's build.patch applied by --3way.
# Expected: the 36 other paths clean, conflicts only in kinds.test.mjs and plugins/README.md (dry3-notes.md).
set -uo pipefail
R=$HOME/dewey-scratch/r125; C=/mnt/storage/src/mosaic-stack
BASE=${1:?base sha}
P2=$C/agents/dewey/work/queue-125/build.patch
[ "$(sha256sum < "$P2" | cut -d' ' -f1)" = "$(sha256sum < "$R/build.patch.r2" | cut -d' ' -f1)" ] || { echo "abort: packet patch is not r2"; exit 2; }
[ -e "$R/wt3" ] && { echo "abort: wt3 exists"; exit 2; }
git -C "$C" worktree add --detach "$R/wt3" "$BASE" > "$R/wt3-add.log" 2>&1 || { echo "abort: worktree add"; cat "$R/wt3-add.log"; exit 2; }
ln -s "$C/node_modules" "$R/wt3/node_modules" || exit 2
cd "$R/wt3" || exit 2
git apply --3way "$P2" > "$R/wt3-apply.log" 2>&1; echo "apply --3way rc=$?"
cat "$R/wt3-apply.log"
git status --short | awk '{print $1}' | sort | uniq -c
git diff --name-only --diff-filter=U