From 4b51bb233434e6ce14bb38225051b901c6551c98 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 27 Nov 2024 16:22:08 -0800 Subject: [PATCH] feat: add aiderignore support to FileWatcher initialization --- aider/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aider/main.py b/aider/main.py index ccdeeaa34..4b9267e44 100644 --- a/aider/main.py +++ b/aider/main.py @@ -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()