I am trying to set up Git LFS with my project. However, the diff on blueprints doesn’t seem to work as it appears to be trying to diff the pointer files rather than the assets themselves.
The error I receive is:
The file '(...)/temp-62f998667e73c36f69cf2de466f0b29a766fb6c6-BP_ExampleBP.uasset' contains unrecognizable data, check that it is of the expected type
I wasn’t sure, since the plugin is part of Unreal now, if I should be bugging this here or on SRombauts Github repo
I think I may have been able to reproduce the issue that you are seeing, but in order to make sure would you be able to provide the error message that you are getting and the steps you are following to trigger it?
That matches the error that I saw. Were you viewing the commit history of a Blueprint, then right-clicked one of the commits and selected the “Diff against previous commit” option?
You’re right thk123. The git plugin diffs with the pointer file.
Looking at SRombauts’ repo, when diffing with a specific revision it uses git show [rev]:[path] to dump that file to a temporary location, but this dumps the pointer file as you suspected.
Yeah the fix looks straight forward - just pipe the result of git show [rev]:[path] into git lfs smudge into a file. The best bit? Even works if the file is not a pointer file, just returns the original file. Only awkwardness it won’t work if user doesn’t have LFS installed so would need to detect that.
n.b. untested through the plugin, I’ve just been messing around on the command line but can’t see why it wouldn’t work.
Thanks for pointing this out to us. I have entered UE-34539 to investigate this further. Since SRombauts still works on this plugin, it may be a good idea to report this on his repo as well.
The bug that I saw was from simply doing a diff on a Blueprint without using LFS, so I wouldn’t say that it works correctly without LFS. Your error message is different from what I saw, so I’ll have to try doing some tests using LFS.
I actually got pulled off onto some other tasks for a few days. I am just getting back to my normal tasks, so I’ll be looking at this again in the next day or two.
I spent some time working on this today using a project using LFS with the git repo. I ran the same test I used previously with some large files (120-180 MB), and ended up with the same error message that I had received previously. I didn’t get the error that you mentioned seeing.
Would you be able to provide some more information regarding how your repo is set up, what files you are using with LFS, and how you are trying to get the diff?
Thank you for the additional repro steps you provided. I believe I am now seeing the same message that you described, but it is coming up in the log as a warning instead of an error, and I am not experiencing a crash in the Editor. The diff window also doesn’t open, but in this case I don’t really expect it to do so. I am checking a few more things and should have another ticket entered for this soon.
Just wanted to provide another update. I checked my previous test case to see what, if anything, was being printed to the log when the error message appeared, and it was printing out the same warning message. I hadn’t checked the log previously because it appeared that the error message was what I was looking for. I updated my previous ticket to include the warning message and included a mention of Git LFS as well.