From ec8b794abe5646846118de7f659fda431bee0283 Mon Sep 17 00:00:00 2001 From: vrubelroman Date: Tue, 20 Oct 2026 09:12:11 +0300 Subject: [PATCH] publish-github.sh: do not stop silently when main is the only branch Co-Authored-By: Claude Opus 5.5 --- scripts/publish-github.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish-github.sh b/scripts/publish-github.sh index 5e81a51..79c6911 100755 --- a/scripts/publish-github.sh +++ b/scripts/publish-github.sh @@ -40,7 +40,7 @@ git clone --quiet --bare --no-local "${root}" "${work}/repo.git" cd "${work}/repo.git" # Only main and the tags are published: other branches (work in progress) are dropped # from this copy before filtering. -git for-each-ref --format='%(refname)' refs/heads | grep -vx 'refs/heads/main' | while read -r ref; do +git for-each-ref --format='%(refname)' refs/heads | { grep -vx 'refs/heads/main' || true; } | while read -r ref; do git update-ref -d "${ref}" done