Confused by detected changes and Diff

So this happens a lot, and may not be Plastic–UHhh I mean Version Control’s fault (I used Plastic SCM) but often a .cs file is in the Pending Changes but when I right-click and select “Diff” the diff tool says the two files/versions are identical. So then why is it marked as a pending change?

The same thing happens with the stand-alone Plastic client, so I don’t believe this is unique to the editor extension/package.

I did a quick test and copied the code into WinMerge, then Undo Changes on the cs file in question, loaded it up and copy pasted that into WinMerge (in other words, doing a before and after comparison) and sure enough, the two versions are identical, so why did it show up in pending changes? Like I said, this happens with several files, not just this one unique instance.

Could it be adding/removing break-points? (I use VS Code)

Hi,

By default, Plastic / Unity Version Control is tracking a file as changed when the file timestamp changes.

In the Plastic GUI → Preferences, you can change it so Plastic changes file content (hash) to determine if a file has changed. But it will make the calculation of the pending changes slower.

Regards,
Carlos.

Hello,

Even if I set it to Check the content (hash)… it still includes the files in the Changed Files list.
Upon selecting the file in plastic, it says Files are identical.

What is more interesting, is that I can create a commit with all the identical files and if I push that commit, it does not show up in Changesets, but makes the files disappear from the Changed files list

This creates a very confusing workflow and also more confusing to less technical people.

Could you open a ticket at devops-vcs-support@unity3d.com? We may need to arrange a meeting to debug what could be happening in your environment.

Will have to consult with our legal team, but I hope yes. Thank you.

It could also be whitespace/EOL changes. If your diff window is set to ignore these, it will claim they are identical, when they are in fact not:
8972467--1233637--upload_2023-4-25_16-4-37.png

In WinMerge, make sure to set whitespaces to “Compare”, and to NOT ignore carriage return differences, to “truly” compare the content:
8972467--1233640--upload_2023-4-25_16-7-54.png

I’m also having this problem. Did a ticket get opened? I don’t have a legal team, so I could do it. :slight_smile:

Hi @lcompton feel free to open a ticket. In this thread, there are a few comments explaining possible reasons for this scenario to happen.