Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Add missing YAML files to .gitattributes #998

Merged
merged 1 commit into from
Jan 8, 2019

Conversation

FurkanKambay
Copy link

@FurkanKambay FurkanKambay commented Jan 8, 2019

Fixes #847

(The generated) .gitattributes file was missing some other YAML files besides .prefab, .unity, etc.

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

While I'm not familiar with a lot of these extensions, Unity supports them, so they should be in .gitattributes.

@shana
Copy link
Member

shana commented Jan 8, 2019

Cooooooooooooooool 😃 😃 😄 !

There are more (or so Unity peeps tell me), but the only way to know is to scrape the Unity source (or so Unity peeps tell me), so yay this is a great start!

@shana
Copy link
Member

shana commented Jan 8, 2019

@shana shana merged commit 35f80df into github-for-unity:master Jan 8, 2019
@FurkanKambay FurkanKambay deleted the patch-1 branch January 8, 2019 20:28
@FurkanKambay
Copy link
Author

@shana
Hey! (IDK if I should post this on a closed PR but I didn't want to open an issue for this)

So, I kinda took a look at the Unity source code 😄 and found something.
I think this is kind of a central location for the file extensions:
switch statement in FindIconForFile()

I extracted all the extensions in the switch statement and categorized them. I also added the template in alexkaratarakis/gitattributes to the equation.

Here's a JSON file that has the differences between all 3 repos: gist
(I recommend folding everything to see the structure)

Now, if we look at just the Unity-specific extensions that we don't have here, the list is short:
asmdef, asmref, uss, uxml, prefs.

And these ones in the template repo: cubemap, unitypackage (I think the other 2 aren't valid extensions)

Otherwise, there is quite a lot of difference...

In the Unity source code, there are more extensions for file types like images, video files, etc. We can ignore them or add some of them. (Not all of them are commonly used)

Also, there are extensions that we have but the Unity source code doesn't contain, which is concerning 😟

Anyway, do you think adding any of these extensions is worthwhile? If so, should I open a PR here or in the new repo?

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add diff attribute to .gitattributes for text assets
2 participants