diff options
author | Dominic <yobmod@gmail.com> | 2021-07-31 20:22:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-31 20:22:34 +0100 |
commit | 05825dcaaf6bf3de7d7e2bc595ad6dcb145f11e8 (patch) | |
tree | 9253532b6bb74372d2034c16ad58c6094f11fcc8 /git/repo/base.py | |
parent | 300330dfa2d2baece6d34b450523ac2a079c228b (diff) | |
parent | 2a350b57ce79a0e1b71623d1146c52918232e074 (diff) | |
download | gitpython-05825dcaaf6bf3de7d7e2bc595ad6dcb145f11e8.tar.gz |
Merge pull request #1308 from Yobmod/main
Add remaining types to symbolic.py
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index 355f9399..5581233b 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -412,13 +412,14 @@ class Repo(object): return TagReference(self, full_path) @staticmethod - def _to_full_tag_path(path): - if path.startswith(TagReference._common_path_default + '/'): - return path - if path.startswith(TagReference._common_default + '/'): - return Reference._common_path_default + '/' + path + def _to_full_tag_path(path: PathLike) -> str: + path_str = str(path) + if path_str.startswith(TagReference._common_path_default + '/'): + return path_str + if path_str.startswith(TagReference._common_default + '/'): + return Reference._common_path_default + '/' + path_str else: - return TagReference._common_path_default + '/' + path + return TagReference._common_path_default + '/' + path_str def create_head(self, path: PathLike, commit: str = 'HEAD', force: bool = False, logmsg: Optional[str] = None |