summaryrefslogtreecommitdiff
path: root/git/repo/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/repo/base.py')
-rw-r--r--git/repo/base.py13
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