Added an option to prefix commit messages with 'aider: '.

This commit is contained in:
Paul Gauthier (aider) 2024-06-27 10:21:25 -07:00 committed by Paul Gauthier
parent 9c214e0faf
commit ec682fd683
2 changed files with 8 additions and 0 deletions

View file

@ -345,6 +345,12 @@ def get_parser(default_config_files, git_root):
default=True,
help="Attribute aider commits in the git committer name (default: True)",
)
group.add_argument(
"--attribute-commit-message",
action=argparse.BooleanOptionalAction,
default=False,
help="Prefix commit messages with 'aider: ' (default: False)",
)
group.add_argument(
"--dry-run",
action=argparse.BooleanOptionalAction,

View file

@ -221,6 +221,7 @@ class Coder:
test_cmd=None,
attribute_author=True,
attribute_committer=True,
attribute_commit_message=False,
):
if not fnames:
fnames = []
@ -280,6 +281,7 @@ class Coder:
models=main_model.commit_message_models(),
attribute_author=attribute_author,
attribute_committer=attribute_committer,
attribute_commit_message=attribute_commit_message,
)
self.root = self.repo.root
except FileNotFoundError: