mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 06:44:59 +00:00
feat: Add GitRepo.get_head() method
This commit is contained in:
parent
1a3f4041f7
commit
ca9ef60ede
1 changed files with 6 additions and 0 deletions
|
@ -356,3 +356,9 @@ class GitRepo:
|
|||
return True
|
||||
|
||||
return self.repo.is_dirty(path=path)
|
||||
|
||||
def get_head(self):
|
||||
try:
|
||||
return self.repo.head.commit.hexsha
|
||||
except ValueError:
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue