mirror of
https://github.com/Aider-AI/aider
synced 2026-04-25 17:15:07 +02:00
Merge pull request #4830 from chr15m/add-readonly-no-git-feature
Allow adding files outside repo when git commits off.
This commit is contained in:
@@ -846,7 +846,11 @@ class Commands:
|
||||
for matched_file in sorted(all_matched_files):
|
||||
abs_file_path = self.coder.abs_root_path(matched_file)
|
||||
|
||||
if not abs_file_path.startswith(self.coder.root) and not is_image_file(matched_file):
|
||||
if (
|
||||
not abs_file_path.startswith(self.coder.root)
|
||||
and not is_image_file(matched_file)
|
||||
and self.coder.auto_commits
|
||||
):
|
||||
self.io.tool_error(
|
||||
f"Can not add {abs_file_path}, which is not within {self.coder.root}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user