summaryrefslogtreecommitdiff
path: root/lib/git/head.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/git/head.py')
-rw-r--r--lib/git/head.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/git/head.py b/lib/git/head.py
index 4386aa98..c56bb1fa 100644
--- a/lib/git/head.py
+++ b/lib/git/head.py
@@ -104,7 +104,12 @@ class Head(object):
git.Head
"""
full_name, ids = line.split("\x00")
- name = full_name.split("/")[-1]
+
+ if full_name.startswith('refs/heads/'):
+ name = full_name[len('refs/heads/'):]
+ else:
+ name = full_name
+
c = commit.Commit(repo, id=ids)
return Head(name, c)