force language detection for files in .gitignore #6611
-
I'm implementing a crawler.
a simple reproduce repo https://github.com/Icyrockton/linguistic_test python main.py |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Your repo link is inaccessible.
No. Linguist expects to work on files in a git repo by default and will always look first to see if the file is in a repo. If the files are in a repo but in a directory ignored by git, then Linguist (technically rugged which does the repo accessing etc) won't be able to find the files and you get the behaviour you are seeing. This is the section of code doing this (lines 97-104): Lines 97 to 107 in 7ca3799 The only way around this is to put the files in a directory completely outside of any git repo which will then be taken care of by line 106 above. |
Beta Was this translation helpful? Give feedback.
Your repo link is inaccessible.
No. Linguist expects to work on files in a git repo by default and will always look first to see if the file is in a repo. If the files are in a repo but in a directory ignored by git, then Linguist (technically rugged which does the repo accessing etc) won't be able to find the files and you get the behaviour you are seeing.
This is the section of code doing this (lines 97-104):
linguist/bin/github-linguist
Lines 97 to 107 in 7ca3799