fix: remove force flag from push_to_gitea heads refspec to avoid overwriting Gitea commits
This commit is contained in:
+4
-1
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user