From f62e5bd883fef08fc80cbed0410452fe4e0b719b Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 29 Jul 2024 16:35:40 -0300 Subject: [PATCH] Get all dirty files in the repo if no files are specified --- aider/commands.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aider/commands.py b/aider/commands.py index dba7e35e2..09d4c91ac 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -227,7 +227,13 @@ class Commands: if not fnames: fnames = self.coder.get_inchat_relative_files() - # todo: if not fnames: get all the dirty files in the repo + # If still no files, get all dirty files in the repo + if not fnames and self.coder.repo: + fnames = [ + self.coder.get_rel_fname(f) + for f in self.coder.repo.get_tracked_files() + if self.coder.repo.is_dirty(f) + ] if not fnames: self.io.tool_error("No dirty files to lint.")