diff --git a/svn_mirror/gitea.py b/svn_mirror/gitea.py index 172e6cc..1ea5ba7 100644 --- a/svn_mirror/gitea.py +++ b/svn_mirror/gitea.py @@ -84,7 +84,8 @@ def push_to_gitea(mirror: Mirror) -> bool: # and DOES NOT trigger Gitea's pre-receive hook. # Only fast-forward updates allowed (no `+` prefix on heads). # 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/*", "+refs/tags/*:refs/tags/*"] try: