mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
fix: handle git errors when listing files in the repository
This commit is contained in:
parent
82f8aa5d6a
commit
73e7d7bd2a
1 changed files with 4 additions and 0 deletions
|
@ -257,6 +257,10 @@ 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:
|
||||||
|
self.io.tool_error(f"Unable to list files in git repo: {err}")
|
||||||
|
self.io.tool_output("Is your git repo corrupted?")
|
||||||
|
return []
|
||||||
|
|
||||||
files = set()
|
files = set()
|
||||||
if commit:
|
if commit:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue