Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
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

Description

@shana

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)

Activity

  1. FurkanKambay commented on Dec 28, 2018

    @FurkanKambay

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

  2. shana commented on Jan 8, 2019

    @shana
    MemberAuthor

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

  3. FurkanKambay commented on Jan 8, 2019

    @FurkanKambay

    @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

  4. shana commented on Jan 8, 2019

    @shana
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions