fix: remove --prune from push_to_gitea to avoid deleting user branches
This commit is contained in:
+2
-1
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user