We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20e28ca commit ff0139dCopy full SHA for ff0139d
readthedocs/vcs_support/backends/git.py
@@ -123,11 +123,18 @@ def clone(self):
123
124
@property
125
def tags(self):
126
+ versions = []
127
repo = git.Repo(self.working_dir)
- versions = [
128
- VCSVersion(self, str(tag.commit), str(tag))
129
- for tag in repo.tags
130
- ]
+ for tag in repo.tags:
+ try:
+ versions.append(VCSVersion(self, str(tag.commit), str(tag)))
131
+ except ValueError as e:
132
+ # ValueError: Cannot resolve commit as tag TAGNAME points to a
133
+ # blob object - use the `.object` property instead to access it
134
+ # This is not a real tag for us, so we skip it
135
+ # https://github.com/rtfd/readthedocs.org/issues/4440
136
+ log.warning('Git tag skipped: %s', tag, exc_info=True)
137
+ continue
138
return versions
139
140
0 commit comments