diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-07-06 20:21:52 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-07-06 20:21:52 +0200 |
commit | 9059525a75b91e6eb6a425f1edcc608739727168 (patch) | |
tree | 3c3985fc1bc5efe0d9a19ceafdfc8d482297192b /lib/git/refs.py | |
parent | 73959f3a2d4f224fbda03c8a8850f66f53d8cb3b (diff) | |
download | gitpython-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.py | 3 |
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 |