feat: daemon polls Gitea for new commits before sync_git_to_svn

This commit is contained in:
2026-06-24 11:45:05 +02:00
parent 981daaef30
commit 4f41bd3488
2 changed files with 4 additions and 10 deletions
+2 -9
View File
@@ -127,12 +127,5 @@ def fetch_from_gitea(mirror: Mirror, ref: Optional[str] = None) -> bool:
timeout=300,
)
# Check if anything changed
out = _git("--git-dir", canonical, "rev-list", "--count",
f"HEAD..FETCH_HEAD", timeout=30, check=False)
if out and out.strip() != "0":
logger.info("Fetched new commits from Gitea")
return True
logger.debug("No new commits from Gitea")
return False
logger.debug("Fetch from Gitea complete")
return True