mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
refactor: Improve FileWatcher initialization with gitignore handling
This commit is contained in:
parent
4a0100271f
commit
0d4f9f00ee
1 changed files with 4 additions and 4 deletions
|
@ -794,11 +794,11 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
if return_coder:
|
||||
return coder
|
||||
|
||||
ignores = []
|
||||
if git_root:
|
||||
gitignore = [str(Path(git_root) / ".gitignore")]
|
||||
self.file_watcher = FileWatcher(git_root, encoding=self.encoding, gitignores=gitignore)
|
||||
else:
|
||||
self.file_watcher = FileWatcher(".", encoding=self.encoding)
|
||||
ignores += [str(Path(git_root) / ".gitignore")]
|
||||
# ai: add aiderignores too!
|
||||
io.file_watcher = FileWatcher(coder, encoding=self.encoding, gitignores=gitignore)
|
||||
|
||||
coder.show_announcements()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue