SRombauts / UEGitPlugin

Unreal Engine 5 Git LFS 2 Source Control Plugin (beta)
http://srombauts.github.io/UEGitPlugin
MIT License
808 stars 165 forks source link

UE-44637: Deleting an asset is unsuccessful if the asset is marked for add (since UE4.13) #41

Closed SRombauts closed 6 years ago

SRombauts commented 7 years ago

https://issues.unrealengine.com/issue/UE-44637 https://answers.unrealengine.com/questions/583992/can-not-delete-asset-that-is-marked-for-add-with-g.html

Deleting an asset that is marked for add when using the Git source control plugin no longer actually deletes the asset. Instead the file will be removed from the Content Browser (it actually stays in the Content Browser after the delete process completes in 4.17), but the corresponding .uasset file remains in the project's Content folder on the disk, and when the project is opened again, those files will once again be seen in the Content Browser and will still be marked for add.

REGRESSION: Yes. In 4.13, deleting an asset marked for add when using the Git source control plugin deleted the associated .uasset file from the project's Content folder as well, and the asset would not reappear in the Content Browser the next time the project is opened.

SRombauts commented 6 years ago
LogSourceControl: ExecuteSynchronousCommand(UpdateStatus)
LogSourceControl: RunCommand: 'git status --porcelain --ignored "C:/Users/sebas/workspace/UE4GitPluginDev/Content/UE4GitPluginDev/NewFolder/NewBlueprint.uasset"'
LogSourceControl: RunCommand(status):
A  Content/UE4GitPluginDev/NewFolder/NewBlueprint.uasset

LogSourceControl: RunCommand: 'git reset "C:/Users/sebas/workspace/UE4GitPluginDev/Content/UE4GitPluginDev/NewFolder/NewBlueprint.uasset"'
LogSourceControl: RunCommand(reset):
LogSourceControl: Warning: RunCommand(reset) ReturnCode=128:
fatal: Invalid object name 'C'.
SRombauts commented 6 years ago

https://answers.unrealengine.com/questions/583992/can-not-delete-asset-that-is-marked-for-add-with-g.html

HenningAx Apr 03 '17 at 5:59 PM

I think I found the source of the bug.

The code lines to look up is: Line 1603-1666 in ObjectTools.cpp

SRombauts commented 6 years ago

I created the PR 4062 for Epic Games

It will NOT be in UE4.18 (too late) so it will have to wait for UE4.19.