diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index e7642376a..f0b922ab0 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -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):