Diff between a823f8deb42790a4457b008864447960ea543c32 and 1fd24f86fabd7017ef8d2bf87f3554b2222abcd6

Changed Files

File Additions Deletions Status
git/ref.py +8 -0 modified

Full Patch

diff --git a/git/ref.py b/git/ref.py
index 626987f..0eae983 100644
--- a/git/ref.py
+++ b/git/ref.py
@@ -5,6 +5,14 @@ import pygit2 as git
 def get_refs(path):
     repo = git.Repository(path)
     refs = []
+    # add head ref manually
+    head_ref = repo.head
+    refs.append({
+        'name': "HEAD",
+        'shorthand': "HEAD",
+        'target': str(head_ref.target)
+    })
+    
     for ref_name in repo.listall_references():
         ref = repo.lookup_reference(ref_name)
         refs.append({