fix: use get_head() in show_undo_hint

This commit is contained in:
Paul Gauthier (aider) 2024-08-09 19:41:46 -04:00
parent ca9ef60ede
commit 2526426da7

View file

@ -1662,7 +1662,7 @@ class Coder:
self.commands.cmd_diff()
def show_undo_hint(self, commit_hash):
if self.commit_before_message != self.repo.repo.head.commit.hexsha:
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}.")
def dirty_commit(self):