| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 057514e commit abf9373
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -402,7 +402,18 @@ def tags(self) -> 'IterableList': | |||
| 402 | 402 | def tag(self, path: PathLike) -> TagReference: | |
| 403 | 403 | """:return: TagReference Object, reference pointing to a Commit or Tag | |
| 404 | 404 | :param path: path to the tag reference, i.e. 0.1.5 or tags/0.1.5 """ | |
| 405 | - return TagReference(self, path) | ||
| 405 | + full_path = self._to_full_tag_path(path) | ||
| 406 | + return TagReference(self, full_path) | ||
| 407 | + | ||
| 408 | + @staticmethod | ||
| 409 | + def _to_full_tag_path(path: PathLike): | ||
| 410 | + if path.startswith(TagReference._common_path_default + '/'): | ||
| 411 | + return path | ||
| 412 | + if path.startswith(TagReference._common_default + '/'): | ||
| 413 | + return Reference._common_path_default + '/' + path | ||
| 414 | + else: | ||
| 415 | + return TagReference._common_path_default + '/' + path | ||
| 416 | + | ||
| 406 | 417 | ||
| 407 | 418 | def create_head(self, path: PathLike, commit: str = 'HEAD', | |
| 408 | 419 | force: bool = False, logmsg: Optional[str] = None | |
| Back | FazBrowse Home | New Git URL |
0 commit comments