diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-07-06 11:16:49 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-07-06 11:16:49 +0200 |
commit | a32a6bcd784fca9cb2b17365591c29d15c2f638e (patch) | |
tree | 71436e79003e3c752d0277c499a752793a107e27 /lib/git/refs.py | |
parent | 1c6d7830d9b87f47a0bfe82b3b5424a32e3164ad (diff) | |
download | gitpython-a32a6bcd784fca9cb2b17365591c29d15c2f638e.tar.gz |
Refs now use object.new_from_sha where possible, preventing git-batch-check to be started up for sha resolution
Diffstat (limited to 'lib/git/refs.py')
-rw-r--r-- | lib/git/refs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/git/refs.py b/lib/git/refs.py index 23d45ed0..8b773ae7 100644 --- a/lib/git/refs.py +++ b/lib/git/refs.py @@ -210,7 +210,7 @@ class SymbolicReference(object): except AttributeError: sha = str(ref) try: - obj = Object.new(self.repo, sha) + obj = Object.new_from_sha(self.repo, hex_to_bin(sha)) if obj.type != "commit": raise TypeError("Invalid object type behind sha: %s" % sha) write_value = obj.hexsha @@ -536,7 +536,7 @@ class Reference(SymbolicReference, LazyMixin, Iterable): always point to the actual object as it gets re-created on each query""" # have to be dynamic here as we may be a tag which can point to anything # Our path will be resolved to the hexsha which will be used accordingly - return Object.new(self.repo, self.path) + return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path))) def _set_object(self, ref): """ |