|
26 | 26 |
|
27 | 27 | if TYPE_CHECKING:
|
28 | 28 | from git.repo import Repo
|
29 |
| - from git.refs import Head, TagReference, Reference |
| 29 | + from git.refs import Head, TagReference, RemoteReference, Reference |
30 | 30 | from .log import RefLogEntry
|
31 | 31 | from git.config import GitConfigParser
|
32 | 32 | from git.objects.commit import Actor
|
@@ -65,7 +65,6 @@ class SymbolicReference(object):
|
65 | 65 | def __init__(self, repo: 'Repo', path: PathLike, check_path: bool = False):
|
66 | 66 | self.repo = repo
|
67 | 67 | self.path = path
|
68 |
| - self.ref = self.reference |
69 | 68 |
|
70 | 69 | def __str__(self) -> str:
|
71 | 70 | return str(self.path)
|
@@ -363,15 +362,8 @@ def set_reference(self, ref: Union[Commit_ish, 'SymbolicReference', str],
|
363 | 362 | return self
|
364 | 363 |
|
365 | 364 | # aliased reference
|
366 |
| - # reference = property(_get_reference, set_reference, doc="Returns the Reference we point to") # type: ignore |
367 |
| - |
368 |
| - @property |
369 |
| - def reference(self) -> 'Reference': |
370 |
| - return self._get_reference() |
371 |
| - |
372 |
| - @reference.setter |
373 |
| - def reference(self, *args, **kwargs): |
374 |
| - return self.set_reference(*args, **kwargs) |
| 365 | + reference = property(_get_reference, set_reference, doc="Returns the Reference we point to") # type: ignore |
| 366 | + ref: Union['Head', 'TagReference', 'RemoteReference', 'Reference'] = reference # type: ignore |
375 | 367 |
|
376 | 368 | def is_valid(self) -> bool:
|
377 | 369 | """
|
|
0 commit comments