mount_beads.sh: reject git worktrees as mount targets

This commit is contained in:
Levi Neely 2026-03-16 15:00:59 +01:00
parent 5a81faa5f9
commit ff77225643
1 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,12 @@ if [ -z "$CWD" ]; then
exit 1
fi
# Reject if CWD is a git worktree (not the main repo)
if [ -f "$CWD/.git" ]; then
echo "error: $CWD is a git worktree, not a base repo — mount the parent project instead" >&2
exit 1
fi
MOUNT=$(uuidgen | cut -d- -f1)
echo "mount $CWD $MOUNT" | 9p write anvillm/beads/ctl