mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
refactor: conditionally use git root and gitignore in FileWatcher initialization
This commit is contained in:
parent
52a467806a
commit
4a0100271f
1 changed files with 5 additions and 4 deletions
|
@ -794,10 +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
|
||||||
|
|
||||||
# ai if git_root, use gitignore
|
if git_root:
|
||||||
gitignore = [str(Path(root) / ".gitignore")]
|
gitignore = [str(Path(git_root) / ".gitignore")]
|
||||||
# ai pass coder.root to FW!
|
self.file_watcher = FileWatcher(git_root, encoding=self.encoding, gitignores=gitignore)
|
||||||
self.file_watcher = FileWatcher(root, encoding=self.encoding, gitignores=gitignore)
|
else:
|
||||||
|
self.file_watcher = FileWatcher(".", encoding=self.encoding)
|
||||||
|
|
||||||
coder.show_announcements()
|
coder.show_announcements()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue