mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
aider: Added support for --no-auto-commit
argument.
# Context: USER: do the same for --no-auto-commit ASSISTANT: To support `auto_commit: true` in the configuration file, you can add a `--auto-commit` argument with the `store_true` action. Here's how to modify the `aider/main.py` file: ```python aider/main.py <<<<<<< ORIGINAL parser.add_argument( "--no-auto-commits", action="store_false", dest="auto_commits", env_var=f"{env_prefix}AUTO_COMMITS", help="Disable auto commit of changes", default=True, ) ======= parser.add_argument( "--auto-commit", action="store_true", default=True, help="Enable auto commit of changes (default: True)", ) parser.add_argument( "--no-auto-commit", action="store_false", dest="auto_commit", env_var=f"{env_prefix}AUTO_COMMIT", help="Disable auto commit of changes", ) >>>>>>> UPDATED ``` Now, you can use `auto_commit: true` in your configuration file without any issues.
This commit is contained in:
parent
69f591a194
commit
1761325eef
1 changed files with 11 additions and 5 deletions
|
@ -102,12 +102,18 @@ def main(args=None, input=None, output=None):
|
|||
help="Apply the changes from the given file instead of running the chat (debug)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--no-auto-commits",
|
||||
action="store_false",
|
||||
dest="auto_commits",
|
||||
env_var=f"{env_prefix}AUTO_COMMITS",
|
||||
help="Disable auto commit of changes",
|
||||
"--auto-commit",
|
||||
action="store_true",
|
||||
default=True,
|
||||
help="Enable auto commit of changes (default: True)",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--no-auto-commit",
|
||||
action="store_false",
|
||||
dest="auto_commit",
|
||||
env_var=f"{env_prefix}AUTO_COMMIT",
|
||||
help="Disable auto commit of changes",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--dry-run",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue