From ff77225643498fb31675cb99dc3daee28d5f3739 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Mon, 16 Mar 2026 15:00:59 +0100 Subject: [PATCH] mount_beads.sh: reject git worktrees as mount targets --- mcptools/mount_beads.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mcptools/mount_beads.sh b/mcptools/mount_beads.sh index 9dc0736..ce29170 100755 --- a/mcptools/mount_beads.sh +++ b/mcptools/mount_beads.sh @@ -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