summaryrefslogtreecommitdiff
path: root/lib/git/refs.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-07-06 20:21:52 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-07-06 20:21:52 +0200
commit9059525a75b91e6eb6a425f1edcc608739727168 (patch)
tree3c3985fc1bc5efe0d9a19ceafdfc8d482297192b /lib/git/refs.py
parent73959f3a2d4f224fbda03c8a8850f66f53d8cb3b (diff)
downloadgitpython-9059525a75b91e6eb6a425f1edcc608739727168.tar.gz
Made repo.py a package to allow better localization of functions and utilities - the repo module got rather large
Diffstat (limited to 'lib/git/refs.py')
-rw-r--r--lib/git/refs.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/git/refs.py b/lib/git/refs.py
index 8b773ae7..be094d01 100644
--- a/lib/git/refs.py
+++ b/lib/git/refs.py
@@ -208,9 +208,8 @@ class SymbolicReference(object):
try:
write_value = ref.commit.hexsha
except AttributeError:
- sha = str(ref)
try:
- obj = Object.new_from_sha(self.repo, hex_to_bin(sha))
+ obj = self.repo.rev_parse(ref+"^{}") # optionally deref tags
if obj.type != "commit":
raise TypeError("Invalid object type behind sha: %s" % sha)
write_value = obj.hexsha