mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
fix: Show undo hint only if current HEAD is not the same as commit_before_message
This commit is contained in:
parent
82679ee66b
commit
1a3f4041f7
1 changed files with 3 additions and 2 deletions
|
@ -1661,8 +1661,9 @@ class Coder:
|
|||
if self.show_diffs:
|
||||
self.commands.cmd_diff()
|
||||
|
||||
def show_undo_hint(self):
|
||||
self.io.tool_output(f"You can use /undo to revert and discard commit {commit_hash}.")
|
||||
def show_undo_hint(self, commit_hash):
|
||||
if self.commit_before_message != self.repo.repo.head.commit.hexsha:
|
||||
self.io.tool_output(f"You can use /undo to revert and discard commit {commit_hash}.")
|
||||
|
||||
def dirty_commit(self):
|
||||
if not self.need_commit_before_edits:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue