fix(tests): auto-init submodules when bats binary is missing #77
Reference in New Issue
Block a user
Delete Branch "docs/lessons-worktree-architecture"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
tests/run-bats.shnow auto-runsgit submodule update --init --recursivewhen the bats binary is missing, instead of just erroring with instructions. Fresh worktrees don't have submodules checked out, so the pre-pushrun-testshook previously failed on the very first push attempt in any new worktree.LESSONS.mdentries from this session: the repo root is a bare checkout with no working tree (edits there are invisible to git — worktrees are required for any real work), and localremotes/origin/*refs go stale after a merge, so remote branch state should be verified via the Gitea API before asking about cleanup.Test plan
run-bats.shauto-initialized submodules and the full bats suite (101 tests) passed