fix: Use get_dirty_files method to retrieve dirty files in the repository

This commit is contained in:
Paul Gauthier 2024-08-01 16:59:06 -03:00 committed by Paul Gauthier (aider)
parent 2a4b6da1d9
commit 96dca6cd5f

View file

@ -231,12 +231,14 @@ class Commands:
# If still no files, get all dirty files in the repo
if not fnames and self.coder.repo:
fnames = [item.a_path for item in self.coder.repo.repo.index.diff(None)]
fnames = self.coder.repo.get_dirty_files()
if not fnames:
self.io.tool_error("No dirty files to lint.")
return
fnames = [self.coder.abs_root_path(fname) for fname in fnames]
lint_coder = None
for fname in fnames:
try: