You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Add diff attribute to .gitattributes for text assets #847
We should add a diff attribute to .gitattributes on the filetypes that are text files (like prefab, asset, unity, etc), so that diffs for them are shown on the command line (currently git skips showing diff because it thinks these files are binary)
@shana Since the files are text files, why do we avoid EOL conversions exactly? I'm personally considering removing -text and adding eol=lf for my repo. Is there something I'm missing?
Also, Unity has other file types like .mat for materials; did those get overlooked or do they not need the merge tool for some reason? I can open PR for that after I find out all the file extensions.
@FurkanKambay These are files generated and managed by Unity, and Unity always generates them with a certain EOL, which means the eol conversion will always spam the user with "Warning LF will be replaced" etc etc if they commit on the command line. I don't see the point of letting git do eol conversions on these files by default, especially on windows.
As for .mat files, they got overlooked :/ I honestly think I've overlooked other yaml types - probably animations too?
@shana I see what you mean. I guess that warning didn't occur to me cause I have core.autocrlf=false. So I'm just gonna do that locally. Thanks for explaining.
Yeah, core.autocrlf=false avoids them, but git has true as the default so I must have it as default as well so I suffer like our users suffer and it's so.annoying.urgh.
We should add a
diffattribute to.gitattributeson the filetypes that are text files (like prefab, asset, unity, etc), so that diffs for them are shown on the command line (currently git skips showing diff because it thinks these files are binary)