From 88bfc74b52bd8cd6efd50c17f4e9e15b050eacea Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 1 Aug 2024 15:55:34 -0300 Subject: [PATCH] feat: Add --subtree-only argument and pass it to GitRepo --- aider/args.py | 6 ++++++ aider/main.py | 1 + 2 files changed, 7 insertions(+) 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