SRombauts / UEGitPlugin

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

Stop auto-pulling when git push fails, ask user to resolve externally #145

Closed sinbad closed 2 years ago

sinbad commented 3 years ago

I added the auto-pull feature in #136 - this removes it and prompts the user about next steps instead.

After using this in practice for a few months I found that the auto-pull would often fail because git lfs couldn't replace the files that UE had open (it showed up as an "unlinking" error). Unfortunately this interrupts the rebase and leaves the repo in a state which has to be resolved carefully, and it's easy for non-expert users to accidentally lose data, or at least think that they had (it was in the reflog in almost all cases but that's not the friendliest place to rummage for non-experts).

I concluded after encountering this a few times that it's better not to do the auto-pull after all, and instead prompt the user to exit the UE editor and pull outside instead, where it's far safer and much less likely to encounter a problem. So this effectively reverses #136 and replaces it with a slightly friendlier notification dialog than before.

sinbad commented 3 years ago

It might have been possible to fix more of these issues, using the sequence in FGitSourceControlMenu::SyncClicked - saving dirty packages and unlinking them. However since I don't know if there are remaining edge cases I think I prefer to not attempt it as an automatic action on Submit just in case.