From ef592d384ad3e0ead5e516f3b2c0f31e6f1e7cab Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 27 Oct 2009 19:10:39 +0100 Subject: Reference._from_string will now create the appropriate type, not just the type of the actual class. This could result in a symbolic reference returned even though you technically requested a reference - this issue must still be addressed. --- lib/git/refs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/git/refs.py') diff --git a/lib/git/refs.py b/lib/git/refs.py index 52e128b5..b032285f 100644 --- a/lib/git/refs.py +++ b/lib/git/refs.py @@ -208,7 +208,7 @@ class Reference(LazyMixin, Iterable): # our path on demand - due to perstent commands it is fast. # This reduces the risk that the object does not match # the changed ref anymore in case it changes in the meanwhile - return cls(repo, full_path) + return cls.from_path(repo, full_path) # obj = get_object_type_by_name(type_name)(repo, hexsha) # obj.size = object_size -- cgit v1.2.1