mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +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:
|
if return_coder:
|
||||||
return coder
|
return coder
|
||||||
|
|
||||||
|
ignores = []
|
||||||
if git_root:
|
if git_root:
|
||||||
gitignore = [str(Path(git_root) / ".gitignore")]
|
ignores += [str(Path(git_root) / ".gitignore")]
|
||||||
self.file_watcher = FileWatcher(git_root, encoding=self.encoding, gitignores=gitignore)
|
# ai: add aiderignores too!
|
||||||
else:
|
io.file_watcher = FileWatcher(coder, encoding=self.encoding, gitignores=gitignore)
|
||||||
self.file_watcher = FileWatcher(".", encoding=self.encoding)
|
|
||||||
|
|
||||||
coder.show_announcements()
|
coder.show_announcements()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue