fix: remove force flag from push_to_gitea heads refspec to avoid overwriting Gitea commits

This commit is contained in:
2026-06-24 15:35:57 +02:00
parent 8b5f0d8ae2
commit 24132b737e
+4 -1
View File
@@ -82,10 +82,13 @@ def push_to_gitea(mirror: Mirror) -> bool:
# Gitea fetches from canonical — this transfers objects + refs,
# and DOES NOT trigger Gitea's pre-receive hook.
# NOTE: no `+` prefix on heads — only fast-forward allowed.
# If Gitea is ahead (user pushed there), this fetch is a no-op
# and `fetch_from_gitea` brings those commits into canonical next.
_git(
"--git-dir", str(gitea_path), "fetch", "--prune",
canonical,
"+refs/heads/*:refs/heads/*",
"refs/heads/*:refs/heads/*",
"+refs/tags/*:refs/tags/*",
timeout=300,
)