I tried compiling the plugin with Unreal Engine 5.8 and encountered several breaking changes to ISourceControlProvider.
I managed to get the plugin compiling and working in UE 5.8 with the following changes.
IsAtLatestRevision() and GetNumLocalChanges() are now final in UE 5.8, so I excluded the plugin overrides for 5.8+:
#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 && ENGINE_MINOR_VERSION < 8
TOptional<bool> IsAtLatestRevision() const override;
TOptional<int> GetNumLocalChanges() const override;
#endif
UE 5.8 also requires these additional ISourceControlProvider methods:
#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 8
virtual bool GetStateBranchAtIndex(int32 BranchIndex, FString& OutBranchName) const override;
virtual bool UsesSoftRevertOnDelete() const override;
virtual TOptional<bool> HasChangesToSync() const override;
virtual TOptional<bool> HasChangesToCheckIn() const override;
#endif
I implemented them as:
bool FGitSourceControlProvider::GetStateBranchAtIndex(int32 BranchIndex, FString& OutBranchName) const
{
if (StatusBranchNamePatternsInternal.IsValidIndex(BranchIndex))
{
OutBranchName = StatusBranchNamePatternsInternal[BranchIndex];
return true;
}
return false;
}
bool FGitSourceControlProvider::UsesSoftRevertOnDelete() const
{
return false;
}
TOptional<bool> FGitSourceControlProvider::HasChangesToSync() const
{
return TOptional<bool>();
}
TOptional<bool> FGitSourceControlProvider::HasChangesToCheckIn() const
{
return TOptional<bool>();
}
After these changes the plugin compiled successfully with UE 5.8 and I tested Git LFS checkout/locking from inside the Unreal Editor successfully.
I tried compiling the plugin with Unreal Engine 5.8 and encountered several breaking changes to ISourceControlProvider.
I managed to get the plugin compiling and working in UE 5.8 with the following changes.
IsAtLatestRevision() and GetNumLocalChanges() are now final in UE 5.8, so I excluded the plugin overrides for 5.8+:
UE 5.8 also requires these additional ISourceControlProvider methods:
I implemented them as:
After these changes the plugin compiled successfully with UE 5.8 and I tested Git LFS checkout/locking from inside the Unreal Editor successfully.