mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
fix: use get_head() in init_before_message
This commit is contained in:
parent
a120cf37d9
commit
d5ff8929fb
1 changed files with 1 additions and 5 deletions
|
@ -670,11 +670,7 @@ class Coder:
|
|||
self.test_outcome = None
|
||||
self.edit_outcome = None
|
||||
if self.repo:
|
||||
try:
|
||||
self.commit_before_message = self.repo.repo.head.commit.hexsha
|
||||
except ValueError:
|
||||
# This occurs when the repository is brand new and has no commits
|
||||
self.commit_before_message = None
|
||||
self.commit_before_message = self.repo.get_head()
|
||||
else:
|
||||
self.commit_before_message = None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue