mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
Added conditional check to only commit if there are dirty files.
This commit is contained in:
parent
4bbeb9de6f
commit
6b6f9e9ed4
1 changed files with 5 additions and 1 deletions
|
@ -166,6 +166,9 @@ class Commands:
|
|||
|
||||
fnames = self.coder.repo.get_dirty_files()
|
||||
|
||||
if fnames:
|
||||
self.cmd_commit("")
|
||||
|
||||
for fname in fnames:
|
||||
errors = self.coder.linter.lint(fname)
|
||||
if errors:
|
||||
|
@ -175,7 +178,8 @@ class Commands:
|
|||
self.coder.abs_fnames.add(abs_file_path)
|
||||
self.coder.run(errors)
|
||||
|
||||
self.cmd_commit("")
|
||||
if self.repo.is_dirty():
|
||||
self.cmd_commit("")
|
||||
|
||||
def cmd_clear(self, args):
|
||||
"Clear the chat history"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue