mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +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.test_outcome = None
|
||||||
self.edit_outcome = None
|
self.edit_outcome = None
|
||||||
if self.repo:
|
if self.repo:
|
||||||
try:
|
self.commit_before_message = self.repo.get_head()
|
||||||
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
|
|
||||||
else:
|
else:
|
||||||
self.commit_before_message = None
|
self.commit_before_message = None
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue