feat: add aiderignore support to FileWatcher initialization

This commit is contained in:
Paul Gauthier (aider) 2024-11-27 16:22:08 -08:00
parent 0d4f9f00ee
commit 4b51bb2334

View file

@ -796,9 +796,10 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
ignores = []
if git_root:
ignores += [str(Path(git_root) / ".gitignore")]
# ai: add aiderignores too!
io.file_watcher = FileWatcher(coder, encoding=self.encoding, gitignores=gitignore)
ignores.append(str(Path(git_root) / ".gitignore"))
if args.aiderignore:
ignores.append(str(Path(git_root) / args.aiderignore))
io.file_watcher = FileWatcher(coder.root, encoding=io.encoding, gitignores=ignores)
coder.show_announcements()