Skip to content

Commit cf292f8

Browse files
authored
Update symbolic.py
1 parent 18b3782 commit cf292f8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

git/refs/symbolic.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class SymbolicReference(object):
6161
def __init__(self, repo: 'Repo', path: PathLike, check_path: bool = False) -> None:
6262
self.repo = repo
6363
self.path = str(path)
64-
self.ref = self._get_reference
6564

6665
def __str__(self) -> str:
6766
return self.path
@@ -283,7 +282,6 @@ def set_object(self, object: Union[Commit_ish, 'SymbolicReference'],
283282

284283
commit = cast('Commit', property(_get_commit, set_commit, doc="Query or set commits directly"))
285284
object = property(_get_object, set_object, doc="Return the object our ref currently refers to") # type: ignore
286-
# reference = property(_get_reference, set_reference, doc="Return the object our ref currently refers to")
287285

288286
def _get_reference(self
289287
) -> Union['Head', 'RemoteReference', 'TagReference', 'Reference']:
@@ -365,6 +363,12 @@ def set_reference(self, ref: Union[str, Commit_ish, 'SymbolicReference'], logmsg
365363

366364
return self
367365

366+
reference: Union['Head', 'RemoteReference', 'TagReference', 'Reference'] = property( # type: ignore
367+
_get_reference, set_reference,
368+
doc="Reference Object we point to")
369+
ref = reference
370+
371+
"""
368372
@ property
369373
def reference(self) -> Union['Head', 'RemoteReference', 'TagReference', 'Reference']:
370374
return self._get_reference()
@@ -385,6 +389,7 @@ def is_detached(self):
385389
return False
386390
except TypeError:
387391
return True
392+
"""
388393

389394
def log(self) -> 'RefLog':
390395
"""

0 commit comments

Comments
 (0)