Hello [mention removed],
I’ve reproduced this behavior locally in UE 5.5.4 (launcher release). Based on my research, the Git Source Control plugin does not currently support Git submodules. This is due to how the RepositoryRoot is consistenly used for all Git commands, without adjusting for assets located in plugins or submodules.
As a workaround, you can modify the engine source code to override the repository root dynamically inside RunGetHistory (located in GitSourceControlUtils.cpp). This allows the History option to run in the correct context for your assets inside plugin submodules.
Here’s an example of a hardcoded override for a plugin (and git submodule) named “TestPlugin”:
`// Run a Git “log” command and parse it.
bool RunGetHistory(const FString& InPathToGitBinary, const FString& InRepositoryRoot, const FString& InFile, bool bMergeConflict, TArray& OutErrorMessages, TGitSourceControlHistory& OutHistory)
{
// HACK: override the repository root if the file is in a known plugin/submodule path
FString LocalRepoRoot = InRepositoryRoot;
if (InFile.Contains(TEXT(“Plugins/TestPlugin/”)))
{
LocalRepoRoot = FPaths::ConvertRelativePathToFull(FPaths::ProjectDir() / TEXT(“Plugins/TestPlugin”));
}
bool bResults;
{
TArray Results;
TArray Parameters;
Parameters.Add(TEXT(“–follow”)); // follow file renames
Parameters.Add(TEXT(“–date=raw”));
Parameters.Add(TEXT(“–name-status”)); // relative filename at this revision, preceded by a status character
Parameters.Add(TEXT(“–pretty=medium”)); // make sure format matches expected in ParseLogResults
if(bMergeConflict)
{
// In case of a merge conflict, we also need to get the tip of the “remote branch” (MERGE_HEAD) before the log of the “current branch” (HEAD)
// @todo does not work for a cherry-pick! Test for a rebase.
Parameters.Add(TEXT(“MERGE_HEAD”));
Parameters.Add(TEXT(“–max-count 1”));
}
TArray Files;
Files.Add(*InFile);
bResults = RunCommand(TEXT(“log”), InPathToGitBinary, LocalRepoRoot, Parameters, Files, Results, OutErrorMessages);
if(bResults)
{
ParseLogResults(Results, OutHistory);
}
}
for(auto& Revision : OutHistory)
{
// Get file (blob) sha1 id and size
TArray Results;
TArray Parameters;
Parameters.Add(TEXT(“–long”)); // Show object size of blob (file) entries.
Parameters.Add(Revision->GetRevision());
TArray Files;
Files.Add(*Revision->GetFilename());
bResults &= RunCommand(TEXT(“ls-tree”), InPathToGitBinary, LocalRepoRoot, Parameters, Files, Results, OutErrorMessages);
if(bResults && Results.Num())
{
FGitLsTreeParser LsTree(Results);
Revision->FileHash = LsTree.FileHash;
Revision->FileSize = LsTree.FileSize;
}
}
return bResults;
}`Once the change is in place and the engine is rebuilt, you should be able to view the full revision history for any assets within the specified plugin. Note that this change only affects the RunGetHistory method. All other Git commands will continue to use the original root path, and assets outside the specified submodule will continue behaving as before.
An image running the history command on a plugin submodule:
[Image Removed]
Let me know if this resolves the issue.
Best,
Francisco