mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
Update set_repo function to check if file is tracked using git ls-files command.
This commit is contained in:
parent
c9c55aff97
commit
d32ae99de9
1 changed files with 2 additions and 1 deletions
3
coder.py
3
coder.py
|
@ -95,7 +95,8 @@ class Coder:
|
|||
new_files = []
|
||||
for fname in self.fnames:
|
||||
relative_fname = os.path.relpath(fname, repo.working_tree_dir)
|
||||
if relative_fname not in repo.untracked_files:
|
||||
tracked_files = set(repo.git.ls_files().splitlines())
|
||||
if relative_fname not in tracked_files and relative_fname not in repo.untracked_files:
|
||||
continue
|
||||
new_files.append(relative_fname)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue