From 1e03c600b8bbd93bf1b9863ae49005b5361321ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Wed, 19 Aug 2026 11:01:46 +0000 Subject: [PATCH] stop naming a branch when pulling the capabilities repository MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The plugin and capabilities repositories were standardised on `master`, and five places said `origin main` — the setup script's sync and the Update-all path. Swapping them to `master` would be the same mistake wearing a new name. `HEAD` resolves to whatever the remote's default is, so the question stops being asked, exactly as it now does for the marketplace icon URLs. Only the LOCAL branch still needs a name. Third time today that naming a branch was the bug: the icon URLs 404'd on four repositories created as `master`, and these would have broken the moment the rest were renamed to match. Co-Authored-By: Claude Opus 5 --- scripts/setup/officer-setup/lib/layout.sh | 8 +++++--- src/servers/plugins/update.ts | 10 +++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/setup/officer-setup/lib/layout.sh b/scripts/setup/officer-setup/lib/layout.sh index 8ed7b6ce..fade90c7 100644 --- a/scripts/setup/officer-setup/lib/layout.sh +++ b/scripts/setup/officer-setup/lib/layout.sh @@ -85,7 +85,9 @@ capabilities_sync() { local dir; dir="$(layout_items_dir)" if [[ -d "$dir/.git" ]]; then - (cd "$dir" && git pull --ff-only --quiet origin main 2>/dev/null) || return 1 + # `HEAD` rather than a branch name — it resolves to the remote's default, so standardising the + # repositories on one name does not break this the way naming `main` did. + (cd "$dir" && git pull --ff-only --quiet origin HEAD 2>/dev/null) || return 1 return 0 fi @@ -99,7 +101,7 @@ capabilities_sync() { (cd "$dir" \ && git init --quiet \ && git remote add origin "$CAPABILITIES_REPO" 2>/dev/null \ - && git fetch --quiet origin main \ - && git checkout --quiet -B main FETCH_HEAD) || return 1 + && git fetch --quiet origin HEAD \ + && git checkout --quiet -B master FETCH_HEAD) || return 1 fi } diff --git a/src/servers/plugins/update.ts b/src/servers/plugins/update.ts index 3ac29602..239951ed 100644 --- a/src/servers/plugins/update.ts +++ b/src/servers/plugins/update.ts @@ -146,7 +146,10 @@ export async function syncCapabilities(onLog?: OnLog): Promise