Search Unity

Bug Files are identical

Discussion in 'Unity Version Control' started by Marc-Saubion, Mar 6, 2023.

  1. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    655
    Hi.

    For some reason, I have a lot of fake changes in the pending view.

    This is very disruptive as I can't switch branches with them and they visually drown the files I'm actually working on.

    I'm not sure if the issues comes from unity or Plastic, but either, way, this should be automatically handled / filtered.

    Note that I'm using plastic en a computer with a fresh install of Windows.
     
  2. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,443
    There are lots of reports like this.

    Most of the time it's Unity's reliance on human-readable YAML files, because it needs to parse ASCII digits into floats, and then floats back into ASCII digits, which often has tiny rounding discrepancies. More rarely, it's just re-ordering the elements in a dictionary as it flattens it into an array. Both are big nuisances.

    I suggest you find very specific repeatable cases and lay out the evidence here, or in an official bug report. Exactly which lines in which assets change, under what circumstances.
     
  3. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    1,074
    Hi,

    If you are able to identify the specific changed files, you may remove them from source control or add them to the hidden changes list.

    Also the "Pending Changes" view --> Options, you can enable the following setting.

    upload_2023-3-7_11-17-15.png

    Regards,
    Carlos.
     
    Enderderder and Marc-Saubion like this.
  4. Wolfram

    Wolfram

    Joined:
    Feb 16, 2010
    Posts:
    261
    If the diff view in the Pending Changes claims files are identical, it usually means they use different whitespace (=spaces vs. tabs) for indenting, or the EOF marker (=Unix/Mac vs. DOS/Win) changed.

    Make sure the Comparison Method in the diff view is set to "Recognize all" to see the actual differences.

    If this happens often and "for no reason", make sure everybody in your team uses the same Code Editor settings (such as LF vs. CRLF), and your Unity projects have the field ProjectSettings=>Editor=>"Line Endings For New Scripts" set to the same specific value (i.e., "Windows").
     

    Attached Files:

    carlosalba1985 likes this.
  5. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    655
    Thanks, this solved it.

    I think you should consider ticking that box by default.

    It looks like an option that was relevant on older hard drives. I didn't notice any performances difference on my machine.