mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
fix: Add check for commit_before_message before showing undo hint
This commit is contained in:
parent
2526426da7
commit
a120cf37d9
1 changed files with 2 additions and 0 deletions
|
@ -1662,6 +1662,8 @@ class Coder:
|
|||
self.commands.cmd_diff()
|
||||
|
||||
def show_undo_hint(self, commit_hash):
|
||||
if not self.commit_before_message:
|
||||
return
|
||||
if self.commit_before_message != self.repo.get_head():
|
||||
self.io.tool_output(f"You can use /undo to revert and discard commit {commit_hash}.")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue