summaryrefslogtreecommitdiff
path: root/lib/git/refs.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-15 15:42:00 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-15 15:42:00 +0200
commit39229db70e71a6be275dafb3dd9468930e40ae48 (patch)
treec631f2b69c7f5874834214cf32970c48f05b5613 /lib/git/refs.py
parent9f51eeb2f9a1efe22e45f7a1f7b963100f2f8e6b (diff)
downloadgitpython-39229db70e71a6be275dafb3dd9468930e40ae48.tar.gz
Object can now create objects of the proper type in case one attempts to create an object directly - this feature is used in several places now, allowing for additional type-checking
Diffstat (limited to 'lib/git/refs.py')
-rw-r--r--lib/git/refs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/git/refs.py b/lib/git/refs.py
index 8ed578ef..a4d7bbb1 100644
--- a/lib/git/refs.py
+++ b/lib/git/refs.py
@@ -71,8 +71,8 @@ class Reference(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
- hexsha, typename, size = self.repo.git.get_object_header(self.path)
- return get_object_type_by_name(typename)(self.repo, hexsha)
+ # Our path will be resolved to the hexsha which will be used accordingly
+ return Object(self.repo, self.path)
@classmethod
def iter_items(cls, repo, common_path = "refs", **kwargs):