mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +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:
|
||||
return coder
|
||||
|
||||
# ai if git_root, use gitignore
|
||||
gitignore = [str(Path(root) / ".gitignore")]
|
||||
# ai pass coder.root to FW!
|
||||
self.file_watcher = FileWatcher(root, encoding=self.encoding, gitignores=gitignore)
|
||||
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)
|
||||
|
||||
coder.show_announcements()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue