From b8f97f07315d06e6ac8042e5a31d73cc6d5354b6 Mon Sep 17 00:00:00 2001 From: Grant Whitmer Date: Wed, 23 Sep 2026 09:57:57 -0400 Subject: [PATCH] ops: sync never pushes archive/* branches to Windy Git archive/-/ are off-machine safety copies of unpushed work (one-repo doctrine). GitHub holds them; running CI on them is waste. Negative refspec ^refs/heads/archive/* on the push (git 2.43 on Veron). Requested by 8c for windy-pro's Mac mini archive. Co-Authored-By: Claude Opus 5.5 --- scripts/sync_from_github.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/sync_from_github.sh b/scripts/sync_from_github.sh index 25b7630..01d54fd 100755 --- a/scripts/sync_from_github.sh +++ b/scripts/sync_from_github.sh @@ -46,6 +46,10 @@ REPOS="${SYNC_REPOS:-windy-calendar windy-search windy-registry Windy-Clone Wind # queued jobs are invisible in /actions/tasks). Releases are built elsewhere. NO_TAGS="${SYNC_NO_TAGS:-windy-pro}" +# `archive/*` branches never reach Windy Git (negative refspec, git >= 2.29). +# They are off-machine safety copies of unpushed work (one-repo doctrine), not +# work in progress: GitHub holds them, and CI time on them is waste. + mkdir -p "$WORK" log() { printf '[sync %s] %s\n' "$(date -u +%H:%M:%SZ)" "$*"; } @@ -69,7 +73,7 @@ for r in $REPOS; do if git --git-dir="$bare" push --quiet --force \ "https://${WG_OWNER}:${GITEA_ADMIN_TOKEN}@${WG}/${WG_OWNER}/${r}.git" \ - '+refs/heads/*:refs/heads/*' $([[ " $NO_TAGS " == *" $r "* ]] || echo '+refs/tags/*:refs/tags/*') 2>/dev/null; then + '+refs/heads/*:refs/heads/*' '^refs/heads/archive/*' $([[ " $NO_TAGS " == *" $r "* ]] || echo '+refs/tags/*:refs/tags/*') 2>/dev/null; then log "$r ok (${before:0:7})" else log "FAILED push $r -> windy git"; FAILED=1