fix: remove --prune from push_to_gitea to avoid deleting user branches

This commit is contained in:
2026-07-16 15:46:48 +02:00
parent 0035596551
commit 31bf43dfc8
+2 -1
View File
@@ -84,7 +84,8 @@ def push_to_gitea(mirror: Mirror) -> bool:
# and DOES NOT trigger Gitea's pre-receive hook. # and DOES NOT trigger Gitea's pre-receive hook.
# Only fast-forward updates allowed (no `+` prefix on heads). # Only fast-forward updates allowed (no `+` prefix on heads).
# If Gitea is ahead (user pushed there), this is safely skipped. # If Gitea is ahead (user pushed there), this is safely skipped.
cmd = ["git", "--git-dir", str(gitea_path), "fetch", "--prune", # NOTE: no `--prune` — would delete Gitea-only branches (user pushes)
cmd = ["git", "--git-dir", str(gitea_path), "fetch",
canonical, "refs/heads/*:refs/heads/*", canonical, "refs/heads/*:refs/heads/*",
"+refs/tags/*:refs/tags/*"] "+refs/tags/*:refs/tags/*"]
try: try: