mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
Merge branch 'main' of github.com:Aider-AI/aider
This commit is contained in:
commit
d9ef23ad99
1 changed files with 13 additions and 3 deletions
|
@ -285,9 +285,19 @@ class GitRepo:
|
|||
files = self.tree_files[commit]
|
||||
else:
|
||||
try:
|
||||
for blob in commit.tree.traverse():
|
||||
if blob.type == "blob": # blob is a file
|
||||
files.add(blob.path)
|
||||
iterator = commit.tree.traverse()
|
||||
while True:
|
||||
try:
|
||||
blob = next(iterator)
|
||||
if blob.type == "blob": # blob is a file
|
||||
files.add(blob.path)
|
||||
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:
|
||||
self.git_repo_error = err
|
||||
self.io.tool_error(f"Unable to list files in git repo: {err}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue