diff --git a/lib/helper.py b/lib/helper.py index 80caf03..bb9138d 100644 --- a/lib/helper.py +++ b/lib/helper.py @@ -59,13 +59,13 @@ def update_git_repo(repo_path: str, ignore_git_status: bool) -> bool: if not ignore_git_status: # try to fetch latest changes try: - repo.git.fetch() + fetch_res = repo.remotes.origin.fetch()[0] except git.exc.GitCommandError as e: log.error(str(e)) return False # check for new commits - if repo.rev_parse("HEAD") == repo.rev_parse(f"origin/{repo.active_branch}"): + if not fetch_res.old_commit: log.info("no changes - skipping") return False