From e8c4b3cf8121757dbd131f7f988e18da9d287710 Mon Sep 17 00:00:00 2001 From: Omri Bloch Date: Wed, 1 Nov 2023 10:28:45 +0200 Subject: [PATCH] Do not autocommit after add if autocommit is disabled --- aider/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/commands.py b/aider/commands.py index fa504c5e737..5c02e3c114e 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -327,7 +327,7 @@ def cmd_add(self, args): self.io.tool_output(f"Added {matched_file} to the chat") added_fnames.append(matched_file) - if self.coder.repo and git_added: + if self.coder.repo and git_added and self.coder.auto_commits: git_added = " ".join(git_added) commit_message = f"aider: Added {git_added}" self.coder.repo.commit(message=commit_message)