Replies: 2 comments
-
|
This isn't going to happen as there is absolutely no need for it. We use Accordingly, there is no risk with the linguist overrides clobbering your LFS attributes as they are completely different attributes used for different purposes which you can define on their own lines. To quote a line from the docs:
So if you have the same attribute on multiple matching lines, the latter will apply, however is you have different attributes on different lines, they'll all apply. There's more info in the gitattributes docs. If in doubt, I recommend you test it in a test repo. You can also use Note, the overrides won't have any effect on LFS files anyway as they're not considered because they technically don't live in the repo and aren't shown on GitHub. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you, I misunderstood the documentation
…On Thu, Apr 3, 2025, 7:04 PM Colin Seymour ***@***.***> wrote:
This isn't going to happen as there is absolutely no need for it. We use
.gitattributes because Linguist runs on git repos and thus we take
advantage of the native git attributes functionality. Linguist attributes
behave no differently from any other so the behaviours etc detailed in the gitattributes
docs <https://git-scm.com/docs/gitattributes> apply to linguist's
attributes too.
Accordingly, there is no risk with the linguist overrides clobbering your
LFS attributes as they are completely different attributes used for
different purposes which you can define on their own lines. To quote a line
from the docs:
When more than one pattern matches the path, a later line overrides an
earlier line. This overriding is done per attribute.
So if you have the same attribute on multiple matching lines, the latter
will apply, however is you have different attributes on different lines,
they'll all apply. There's more info in the gitattributes docs. If in
doubt, I recommend you test it in a test repo. You can also use
git-check-attr <https://git-scm.com/docs/git-check-attr> to verify things
without pushing to GitHub.
Note, the overrides won't have any effect on LFS files anyway as they're
not considered because they technically don't live in the repo and aren't
shown on GitHub.
—
Reply to this email directly, view it on GitHub
<#7303 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKVVYNPOO2KGWF2DMFFVPL2XTTQLAVCNFSM6AAAAAB2LDRBG2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENZRGA3DSMA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
I have a gitattributes file which has a bunch of wildcards to define LFS files.
I am afraid to define linguist wildcards because they may clobber the LFS wildcards
It would be great if I could define them in a .linguist file instead so I don't fear breaking something.
Beta Was this translation helpful? Give feedback.
All reactions