feat: Add --subtree-only argument and pass it to GitRepo

This commit is contained in:
Paul Gauthier (aider) 2024-08-01 15:55:34 -03:00
parent e66df79aaf
commit 88bfc74b52
2 changed files with 7 additions and 0 deletions

View file

@ -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,

View file

@ -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