Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix tags not properly indexed in Lucene #291
All tags that reference to particular object are stored in a list within a map. There is a if statement that inits empty list when there are not references to the current object yet, but the boolean expression checks for the wrong value.
I opened this pull request to start a discussion more than to submit a patch.
Oops. Good catch.
I agree and that was the intention.
Generally my answer is the indexer is trying to cover the 98% use-case of tags. While it is possible to tag a non-commit object, as you point out, I believe it to be an infrequently used capability. The indexer indexes commits (with and without tags) and blobs but it does not currently consider that a blob may be tagged. The JGit repo has a good example which tags Shawn's public GPG key. I'd add a Github link if they supported non-commit tags at all. :)
I believe lightweight tags are intended to be used client-side not server-side due to their transitive nature and lack of tagger metadata. For this reason, lightweight tags are deliberately avoided by the indexer.
If we did want to support them, the indexing process would have to be revised. Lucene does not have the ability to update a document so we'd have to destroy all documents which reference the lightweight tag and then re-index the affected objects.
Thanks for the answers.
That's exactly what I had in mind.
That's very nice functionality. Using tags to point to GPG keys seems like a common use case. But when I click on the object link I get an internal server error.