Don't rely on (aider) in git name field to police /undo #698

This commit is contained in:
Paul Gauthier 2024-06-27 07:15:06 -07:00
parent ea97d08449
commit c1e55614f7
2 changed files with 1 additions and 8 deletions

View file

@ -331,10 +331,7 @@ class Commands:
return
last_commit = self.coder.repo.repo.head.commit
if (
not last_commit.author.name.endswith(" (aider)")
or last_commit.hexsha[:7] != self.coder.last_aider_commit_hash
):
if last_commit.hexsha[:7] != self.coder.last_aider_commit_hash:
self.io.tool_error("The last commit was not made by aider in this chat session.")
self.io.tool_error(
"You could try `/git reset --hard HEAD^` but be aware that this is a destructive"