o2sh / onefetch

Command-line Git information tool
https://onefetch.dev
MIT License
10.34k stars 277 forks source link

Parse .gitattributes #1250

Open RoseApollo opened 10 months ago

RoseApollo commented 10 months ago

Summary 💡

.gitattributes overides what language a file extension is mapped to

example (from a unity project):

*.compute linguist-language=HLSL
*.shader linguist-language=HLSL

Motivation 🔦

onefetch should be accurate to the repository's structure, and should report data in the same way github does

spenserblack commented 10 months ago

I do agree that we need some form of overrides. Especially as long as we use tokei. But, unless we use data sourced directly from linguist, I don't think we should use the linguist overrides.

BTW, gengo (https://github.com/o2sh/onefetch/pull/1152) can take overrides from .gitattributes :wink: