Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/fm-merge-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ default_branch() {
BRANCH="fm/$ID"
git -C "$PROJ" rev-parse --verify --quiet "refs/heads/$BRANCH" >/dev/null || { echo "error: branch $BRANCH does not exist in $PROJ" >&2; exit 1; }

DEFAULT=$(default_branch) || { echo "error: cannot determine default branch for $PROJ; expected origin/HEAD, main, or master" >&2; exit 1; }
DEFAULT=$(default_branch) || { echo "error: cannot determine default branch for $PROJ; expected origin/HEAD, or a local main (legacy master also accepted)" >&2; exit 1; }

# The project's main checkout must be on its default branch and clean, so the
# fast-forward lands predictably (firstmate never writes here otherwise).
Expand Down
2 changes: 1 addition & 1 deletion bin/fm-review-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ default_branch() {
return 1
}

DEFAULT=$(default_branch) || { echo "error: cannot determine default branch for $PROJ; expected origin/HEAD, main, or master" >&2; exit 1; }
DEFAULT=$(default_branch) || { echo "error: cannot determine default branch for $PROJ; expected origin/HEAD, or a local main (legacy master also accepted)" >&2; exit 1; }

BRANCH="fm/$ID"
if ! git -C "$WT" rev-parse --verify --quiet "refs/heads/$BRANCH" >/dev/null; then
Expand Down
2 changes: 1 addition & 1 deletion bin/fm-tangle-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# primary checkout is the alarm.

# Resolve the default branch name of the git repo at <dir>: prefer origin/HEAD,
# then fall back to a local main/master. Echoes the name, or returns 1.
# then fall back to a local main (legacy master as a secondary fallback). Echoes the name, or returns 1.
fm_default_branch() {
local dir=$1 ref branch
ref=$(git -C "$dir" symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null || true)
Expand Down
2 changes: 1 addition & 1 deletion bin/fm-teardown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ validate_worktree_teardown_safety() {
unpushed=$(printf '%s\n' "$unpushed_raw" | head -5)

if [ -n "$unpushed" ] && [ "$MODE" = local-only ]; then
DEFAULT=$(default_branch) || { echo "REFUSED: cannot determine default branch for $PROJ; expected origin/HEAD, main, or master." >&2; return 1; }
DEFAULT=$(default_branch) || { echo "REFUSED: cannot determine default branch for $PROJ; expected origin/HEAD, or a local main (legacy master also accepted)." >&2; return 1; }
if ! unmerged_raw=$(git -C "$WT" log --oneline HEAD --not "$DEFAULT" -- 2>/dev/null); then
if worktree_safety_blocked_by_lock "commits not on $DEFAULT"; then
return "$TEARDOWN_WORKTREE_SAFETY_LOCK_BLOCKED"
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Its operating checkout (`FM_ROOT`) and the disposable crewmate worktrees are all
The primary checkout is healthy on its default branch, and linked worktrees or secondmate homes are healthy at detached HEAD.
Only a named non-default branch checked out in `FM_ROOT` is a worktree tangle.

`fm-tangle-lib.sh` resolves the default branch from `origin/HEAD`, then local `main` or `master`, and classifies that named non-default primary branch as the tangle.
`fm-tangle-lib.sh` resolves the default branch from `origin/HEAD`, then local `main` (legacy `master` as a secondary fallback), and classifies that named non-default primary branch as the tangle.
`fm-guard.sh` prints the repair command on the next mutable fleet action, while `bin/fm-session-start.sh` reports the same condition through bootstrap as a `TANGLE:` line at session start.
If another live session holds the fleet lock, both surfaces keep the alarm but switch to read-only wording with no repair command.
Ship briefs also tell the crewmate to verify `pwd -P` and `git rev-parse --show-toplevel` before creating `fm/<id>`, then stop with a blocked status if it landed in the primary checkout.
Expand Down
Loading