-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Skip tags that point to blob objects instead of commits #4442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be rewritten as following
tag.TagObject
has theobject
option which actually points to the commit. It will not raisevalueError
like theRefs.tag.commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I found that when I was researching about this but... is this something useful for Read the Docs? I mean, that blob object where the tag is pointing is something we can build?
I considered that and I thought that it will be useless/tricky/not valid for Read the Docs to consider that as a tag (version) that we want to build.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think as its a feature of git, we should support it. Many projects may use this feature and tag without commit is also in linux kernel. So from RTD point of view, its a tag and we should not consider whethere the tag is pointed to any commit or blob!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A tag can point to a blob, a tree, or even another tag. However, the vast majority of tags across all repos point to commits. A repository that has a non-commit tag is using it for a special purpose (say, it points to a blob of the public key used by the project). With the admittedly limited examples of non-commit tags I've seen none of them could be built as documentation by Read the Docs.
I think it's safe to completely ignore non-commit tags. I would love to see examples of non-commit tags that would somehow be sensible to Read the Docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least until somebody requests it. The fact that nobody has requested it and that non-commit tags caused a repo to fail building on Read the Docs is definitely something to consider as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe if we can support the non commit tags, we should support it. We should not wait till someone open a issue with "My build is not working because my tag does not belong to a commit".
In the solution I provided, we can still support non commit tag as well as commit tag. So why do we exclude the non commit tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't work. It will just fail later. When you attempt to checkout a non-commit tag in git like we do when we attempt to build documentation, you'll get the error:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! I understand! Than I think its better to not have them in Version! Thanks @davidfischer