From 4e77720c6f96d4960b61ef19f32a2ee12218bf96 Mon Sep 17 00:00:00 2001 From: Chris McCormick Date: Sun, 30 Nov 2025 15:21:00 +0800 Subject: [PATCH] Don't stage files with no-auto-commits. --- aider/coders/base_coder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index b824e928693..56613782b02 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -2216,7 +2216,7 @@ def allowed_to_edit(self, path): # Seems unlikely that we needed to create the file, but it was # actually already part of the repo. # But let's only add if we need to, just to be safe. - if need_to_add: + if need_to_add and self.auto_commits: self.repo.repo.git.add(full_path) self.abs_fnames.add(full_path) @@ -2230,7 +2230,7 @@ def allowed_to_edit(self, path): self.io.tool_output(f"Skipping edits to {path}") return - if need_to_add: + if need_to_add and self.auto_commits: self.repo.repo.git.add(full_path) self.abs_fnames.add(full_path)