summaryrefslogtreecommitdiff
path: root/git/refs/symbolic.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/refs/symbolic.py')
-rw-r--r--git/refs/symbolic.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py
index bffcfea5..b072f142 100644
--- a/git/refs/symbolic.py
+++ b/git/refs/symbolic.py
@@ -526,8 +526,9 @@ class SymbolicReference(object):
return ref
@classmethod
- def create(cls, repo: 'Repo', path: PathLike, reference: Union[Commit_ish, str] = 'HEAD',
- logmsg: Union[str, None] = None, force: bool = False, **kwargs: Any):
+ def create(cls: Type[T_References], repo: 'Repo', path: PathLike,
+ reference: Union['SymbolicReference', str] = 'HEAD',
+ logmsg: Union[str, None] = None, force: bool = False, **kwargs: Any) -> T_References:
"""Create a new symbolic reference, hence a reference pointing , to another reference.
:param repo:
@@ -689,6 +690,6 @@ class SymbolicReference(object):
# END for each type to try
raise ValueError("Could not find reference type suitable to handle path %r" % path)
- def is_remote(self):
+ def is_remote(self) -> bool:
""":return: True if this symbolic reference points to a remote branch"""
- return self.path.startswith(self._remote_common_path_default + "/")
+ return str(self.path).startswith(self._remote_common_path_default + "/")