-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Feature Request]: Ignore directories from language statistics bar #14786
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
Comments
So the |
I think that's how This is an example from one of my projects: https://git.qaul.org/qaul/qaul/-/blob/develop/.gitattributes The syntax is otherwise documented here: https://github.com/github/linguist#using-gitattributes |
yes, this is not currently supported |
|
…guage stats and diffs (#16773) Replaces #16262 Replaces #16250 Replaces #14833 This PR first implements a `git check-attr` pipe reader - using `git check-attr --stdin -z --cached` - taking account of the change in the output format in git 1.8.5 and creates a helper function to read a tree into a temporary index file for that pipe reader. It then wires this in to the language stats helper and into the git diff generation. Files which are marked generated will be folded by default. Fixes #14786 Fixes #12653
Gitea version (or commit ref): 1.13.0
Git version: N/A
Operating system: NixOS/ Linux (systemd)
Database (use
[x]
):Can you reproduce the bug at https://try.gitea.io: N/A
Log gist: N/A
Description
The
linguist
project used by GitHub (and GitLab) supports.gitattributes
files in the repository tree to exclude certain directories or files. This is very useful when vendoring large code-bases.I operate a monorepo for all my code, which contains subtrees for many of my project dependencies. Because of this the language bar is not representative of the languages I actually write.
It would be great if there was some way of telling gitea to ignore certain directories for the purpose of language statistics. I had a look at the code, but I really don't know Go and couldn't figure out how to implement it.
It doesn't neccessarily have to be the same
.gitattributes
format thatlinguist
uses (it would be cool though!). It would already be enough if there was a list of "ignore paths" in the project settings screen.Anyway, let me know what you think.
The text was updated successfully, but these errors were encountered: