Skip to content

linguist-generated override not working properly. #5308

Discussion options

You must be logged in to vote

Directly querying a file using github-linguist doesn't honour the overrides in .gitattributes as it doesn't pull in all the repo information and calls vendored? from the blob_helper.rb directly which doesn't pull in the overrides:

https://github.com/github/linguist/blob/a3de9b8d54d0b10c41ed80ab2ee9c4bef45c49da/lib/linguist/blob_helper.rb#L219-L232

When querying the repo as a whole, Linguist uses the vendored? from lazy_blob.rb which does honour overrides:

https://github.com/github/linguist/blob/a3de9b8d54d0b10c41ed80ab2ee9c4bef45c49da/lib/linguist/lazy_blob.rb#L56-L62

When it comes to checking whether a file is vendored or generated, Linguist (actually rugged) will query in the order listed:

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lildude
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #5301 on April 02, 2021 09:00.