feat: Add git_ignored_file method to check files against gitignore

This commit is contained in:
Paul Gauthier 2024-11-13 13:12:25 -08:00 committed by Paul Gauthier (aider)
parent ea1a4ecdc6
commit 218623be28
3 changed files with 17 additions and 0 deletions

View file

@ -331,6 +331,12 @@ class GitRepo:
lines,
)
def git_ignored_file(self, path):
if not self.repo:
return
if self.repo.ignored(path):
return True
def ignored_file(self, fname):
self.refresh_aider_ignore()