Skip to content

Commit bf9814d

Browse files
committed
bugfix: fix git diff command to compare between actual head instead of main status branch, as we already do compare against all status branches in the loop
1 parent 4ac8cd8 commit bf9814d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/GitSourceControl/Private/GitSourceControlUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,9 +1490,9 @@ void CheckRemote(const FString& InPathToGitBinary, const FString& InRepositoryRo
14901490
// which means editor plugins are enabled and running, but they don't run UnrealEdEngine, so the status branches are not initialized.
14911491
if (StatusBranches.Num() > 0)
14921492
{
1493-
// Check if the files state in the branch in which is changed is actually different from status branch
1493+
// Check if the files state in the branch in which is changed is actually different from compared branch
14941494
// This opens files for edit if they were modified in another branch but have since been reverted back to state in status.
1495-
TArray<FString> DiffParametersLog{ TEXT("--pretty="), TEXT("--name-only"), FString::Printf(TEXT("%s..%s"), *StatusBranches[0], *Branch), TEXT(""), TEXT("--") };
1495+
TArray<FString> DiffParametersLog{ TEXT("--pretty="), TEXT("--name-only"), FString::Printf(TEXT("...%s"), *Branch), TEXT(""), TEXT("--") };
14961496
const bool bResultDiff = RunCommand(TEXT("diff"), InPathToGitBinary, InRepositoryRoot, DiffParametersLog, FilesToDiff, DiffResults, ErrorMessages);
14971497
// Get the intersection of the 2 containers
14981498
Intersection = DiffResults.FilterByPredicate([&LogResults](const FString& ChangedFile) { return LogResults.Contains(ChangedFile); });

0 commit comments

Comments
 (0)