From 96dca6cd5fa25cb65af66724810759baf53b0b48 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 1 Aug 2024 16:59:06 -0300 Subject: [PATCH] fix: Use get_dirty_files method to retrieve dirty files in the repository --- aider/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aider/commands.py b/aider/commands.py index a451df7b2..2536de205 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -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: