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