diff --git a/aider/args.py b/aider/args.py index 9bffb116d..3d5596687 100644 --- a/aider/args.py +++ b/aider/args.py @@ -319,6 +319,12 @@ def get_parser(default_config_files, git_root): default=default_aiderignore_file, help="Specify the aider ignore file (default: .aiderignore in git root)", ) + group.add_argument( + "--subtree-only", + action="store_true", + help="Only consider files in the current subtree of the git repository", + default=False, + ) group.add_argument( "--auto-commits", action=argparse.BooleanOptionalAction, diff --git a/aider/main.py b/aider/main.py index 1c580f662..4fccf27fe 100644 --- a/aider/main.py +++ b/aider/main.py @@ -473,6 +473,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F attribute_committer=args.attribute_committer, attribute_commit_message=args.attribute_commit_message, commit_prompt=args.commit_prompt, + subtree_only=args.subtree_only, ) except FileNotFoundError: pass