mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
refactor: Use get_head() in cmd_diff
This commit is contained in:
parent
d5ff8929fb
commit
0b4a3d7b3c
1 changed files with 2 additions and 3 deletions
|
@ -471,9 +471,8 @@ class Commands:
|
|||
self.io.tool_error("No git repository found.")
|
||||
return
|
||||
|
||||
try:
|
||||
current_head = self.coder.repo.repo.head.commit.hexsha
|
||||
except ValueError:
|
||||
current_head = self.coder.repo.get_head()
|
||||
if current_head is None:
|
||||
self.io.tool_error("Unable to get current commit. The repository might be empty.")
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue