fix: Add check for commit_before_message before showing undo hint

This commit is contained in:
Paul Gauthier 2024-08-09 19:42:42 -04:00 committed by Paul Gauthier (aider)
parent 2526426da7
commit a120cf37d9

View file

@ -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}.")