mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
aider: Fix issue in cmd_commit
to set commit_message
to None
if args
does not exist.
# Aider chat conversation: USER: I did `git reset --hard HEAD~1` to discard the last edits. Please wait for further instructions before attempting that change again. Feel free to ask relevant questions about why the changes were reverted. ASSISTANT: Understood. If you have any specific instructions or changes you would like to make, please let me know! USER: in `cmd_commit` issue if args not exist please fix, as leave commit_message as None ASSISTANT: To fix the issue in `cmd_commit` when `args` does not exist, we need to ensure that `commit_message` is set to `None` if `args` is not provided. Here are the changes: 1. Check if `args` is provided and set `commit_message` to `None` if it is not. Here is the *SEARCH/REPLACE* block: aider/commands.py <source>python <<<<<<< SEARCH commit_message = args.strip() ======= commit_message = args.strip() if args else None >>>>>>> REPLACE </source>
This commit is contained in:
parent
c591ecd331
commit
311ae04314
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ class Commands:
|
|||
self.io.tool_error("No more changes to commit.")
|
||||
return
|
||||
|
||||
commit_message = args.strip()
|
||||
commit_message = args.strip() if args else None
|
||||
self.coder.repo.commit(message=commit_message)
|
||||
|
||||
def cmd_lint(self, args="", fnames=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue