diff --git a/repo_cloner/lib/detector.py b/repo_cloner/lib/detector.py index 034329e..8398e95 100644 --- a/repo_cloner/lib/detector.py +++ b/repo_cloner/lib/detector.py @@ -173,7 +173,11 @@ class Detector: def run(self, callback: Callable[[DetectedCommit], None]) -> int: log.info(f"Running commit detector") new_branches = self._repo.list_branches() + if not new_branches: + new_branches = [] new_tags = self._repo.list_tags() + if not new_tags: + new_tags = [] # remove removed old_keys = self._branches.keys()