Skip to content

Commit 8af6b84

Browse files
authored
Merge pull request #213 from gpotrykus/bugfix_status_branch_comparison
bugfix: changes on status branches are not detected
2 parents 4ac8cd8 + bf9814d commit 8af6b84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/GitSourceControl/Private/GitSourceControlUtils.cpp

+2-2
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)