fix: Add error handling for git.ignored() method

This commit is contained in:
Paul Gauthier (aider) 2024-11-14 06:48:35 -08:00
parent 266350b8ce
commit 94c3957d92

View file

@ -334,9 +334,11 @@ class GitRepo:
def git_ignored_file(self, path):
if not self.repo:
return
#ai try/except for git errors!
if self.repo.ignored(path):
return True
try:
if self.repo.ignored(path):
return True
except ANY_GIT_ERROR:
return False
def ignored_file(self, fname):
self.refresh_aider_ignore()