Feature suggestion #14528 (language detection override for new unknown ones) doesn't seem to be working #9664

Closed
opened 2025-11-02 08:45:55 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @ell1e on GitHub (Oct 8, 2022).

Description

I just tested with Gitea 1.17.2, and the feature suggestion #14528 doesn't seem to be working even though I think the comments on the issue suggest it should be.

Basically, make a new repo, add some non-empty test file that ends in a new unused file extension like .bla, then add a .gitattributes line:

*.bla linguist-language=BlaLanguage

The expected result is that the lines of your .bla file get counted and show up as a new entry on the language bar of the repository labelled BlaLanguage. This is however not the case, it just seems to be ignored.

Gitea Version

1.17.2

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

See https://try.gitea.io/blablablablab/blatest

Git Version

No response

Operating System

No response

How are you running Gitea?

It's someone else's instance

Database

No response

Originally created by @ell1e on GitHub (Oct 8, 2022). ### Description I just tested with Gitea 1.17.2, and the feature suggestion #14528 doesn't seem to be working even though I think the comments on the issue suggest it *should* be. Basically, make a new repo, add some non-empty test file that ends in a new unused file extension like `.bla`, then add a `.gitattributes` line: ``` *.bla linguist-language=BlaLanguage ``` The expected result is that the lines of your `.bla` file get counted and show up as a new entry on the language bar of the repository labelled `BlaLanguage`. This is however not the case, it just seems to be ignored. ### Gitea Version 1.17.2 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots See https://try.gitea.io/blablablablab/blatest ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? It's someone else's instance ### Database _No response_
GiteaMirror added the issue/not-a-bug label 2025-11-02 08:45:55 -06:00
Author
Owner

@Drugan-qc commented on GitHub (Oct 8, 2022):

Same issue on my private instance with 1.16.9

@Drugan-qc commented on GitHub (Oct 8, 2022): Same issue on my private instance with 1.16.9
Author
Owner

@KN4CK3R commented on GitHub (Oct 10, 2022):

It works until a certain point. The language gets detected

BlaLang: type unknown
Python: type programming

and sadly filtered out some lines later
94037ada24/modules/git/repo_language_stats_nogogit.go (L187-L195)

@KN4CK3R commented on GitHub (Oct 10, 2022): It works until a certain point. The language gets detected ``` BlaLang: type unknown Python: type programming ``` and sadly filtered out some lines later https://github.com/go-gitea/gitea/blob/94037ada247e8b27c7b456e1eeb9461cdb433d66/modules/git/repo_language_stats_nogogit.go#L187-L195
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9664