diff --git a/aider/repo.py b/aider/repo.py index de71c160353..5a8f0b52e90 100644 --- a/aider/repo.py +++ b/aider/repo.py @@ -291,9 +291,11 @@ def get_tracked_files(self): blob = next(iterator) if blob.type == "blob": # blob is a file files.add(blob.path) - except (IndexError,) + ANY_GIT_ERROR: + except IndexError: self.io.tool_warning(f"GitRepo: read error skipping {blob.path}") continue + except ANY_GIT_ERROR as err: + raise err except StopIteration: break except ANY_GIT_ERROR as err: