Use more efficient method to get all dirty files in cmd_lint

This commit is contained in:
Paul Gauthier (aider) 2024-07-30 15:09:04 -03:00
parent 5f9275a3c2
commit 07780326b4

View file

@ -230,13 +230,8 @@ class Commands:
dump(fnames)
# If still no files, get all dirty files in the repo
tracked_files = self.coder.repo.get_tracked_files()
if not fnames and self.coder.repo:
[
fn
for fn in tracked_files
if self.coder.repo.is_dirty(fn)
]
fnames = [item.a_path for item in self.coder.repo.repo.index.diff(None)]
dump(fnames)