Skip to content
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

Add `diff` attribute to .gitattributes for text assets #847

Closed
shana opened this issue Jun 28, 2018 · 4 comments
Closed

Add `diff` attribute to .gitattributes for text assets #847

shana opened this issue Jun 28, 2018 · 4 comments
Labels

Comments

@shana
Copy link
Contributor

@shana shana commented Jun 28, 2018

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)

@FurkanKambay
Copy link
Contributor

@FurkanKambay FurkanKambay commented Dec 28, 2018

@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.

@shana
Copy link
Contributor Author

@shana shana commented Jan 8, 2019

@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?

@FurkanKambay
Copy link
Contributor

@FurkanKambay FurkanKambay commented Jan 8, 2019

@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.

I created an empty project and created almost everything under Assets/Create. Here it is: https://i.imgur.com/QODfnOr.png

I'm gonna open a PR. We can adjust there.
opened #998

@shana
Copy link
Contributor Author

@shana shana commented Jan 8, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.