fix: Handle additional Git-related errors in GitRepo.list_files

This commit is contained in:
Paul Gauthier 2024-09-09 13:26:07 -07:00 committed by Paul Gauthier (aider)
parent 73e7d7bd2a
commit abf6a9db2e

View file

@ -257,7 +257,7 @@ class GitRepo:
commit = self.repo.head.commit commit = self.repo.head.commit
except ValueError: except ValueError:
commit = None commit = None
except ANY_GIT_ERROR as err: except (OSError,) + ANY_GIT_ERROR as err:
self.io.tool_error(f"Unable to list files in git repo: {err}") self.io.tool_error(f"Unable to list files in git repo: {err}")
self.io.tool_output("Is your git repo corrupted?") self.io.tool_output("Is your git repo corrupted?")
return [] return []