feat: daemon polls Gitea for new commits before sync_git_to_svn
This commit is contained in:
+2
-9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user