Skip to content

Commit

Permalink
Merge pull request #310 from omri123/autocommit-bugfix
Browse files Browse the repository at this point in the history
Do not autocommit after add if autocommit is disabled
  • Loading branch information
paul-gauthier authored Nov 2, 2023
2 parents 4e2e03d + e8c4b3c commit b507ea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aider/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b507ea0

Please sign in to comment.