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 missing YAML files to .gitattributes #998

Merged
merged 1 commit into from Jan 8, 2019

Conversation

@FurkanKambay
Copy link
Contributor

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
Contributor

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
shana approved these changes Jan 8, 2019
@shana
Copy link
Contributor

shana commented Jan 8, 2019

@shana shana merged commit 35f80df into github-for-unity:master Jan 8, 2019
1 check passed
1 check passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@FurkanKambay FurkanKambay deleted the FurkanKambay:patch-1 branch Jan 8, 2019
@FurkanKambay
Copy link
Contributor Author

FurkanKambay commented Aug 27, 2019

@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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

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