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,
|
# Gitea fetches from canonical — this transfers objects + refs,
|
||||||
# and DOES NOT trigger Gitea's pre-receive hook.
|
# 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(
|
||||||
"--git-dir", str(gitea_path), "fetch", "--prune",
|
"--git-dir", str(gitea_path), "fetch", "--prune",
|
||||||
canonical,
|
canonical,
|
||||||
"+refs/heads/*:refs/heads/*",
|
"refs/heads/*:refs/heads/*",
|
||||||
"+refs/tags/*:refs/tags/*",
|
"+refs/tags/*:refs/tags/*",
|
||||||
timeout=300,
|
timeout=300,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user