Skip to content

Commit

Permalink
Merge pull request #515: SparseSetTests: Ensure no edits remain befor…
Browse files Browse the repository at this point in the history
…e merge

Something strange happens with the MergeChangesOutOfTheConeWithConflict
when run in sequence with the other tests in this class. Some edited
files from previous tests cause confusion when running 'git merge'.

For some reason, this is causing a behavior change with the
sparse-index, but it seems that either behavior would be acceptable
here.

Another thing we could do is remove the `ShouldContain("Merge conflict")`
line and the test passes that way, too. This seems like a more robust
solution.

This will resolve the last failing test in microsoft/git#388 for Linux and macOS.

There is one more strange error happening on Windows. Will investigate.
  • Loading branch information
derrickstolee authored Jun 23, 2021
2 parents 14b423c + 73f5998 commit 089296f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ public void MergeChangesOutOfTheConeWithConflict()
string conflictTargetBranch = "FunctionalTests/20170206_Conflict_Target";
GitProcess.Invoke(this.Enlistment.RepoRoot, $"checkout {conflictTargetBranch}");
GitProcess.Invoke(this.Enlistment.RepoRoot, $"checkout {conflictSourceBranch}");
GitProcess.InvokeProcess(this.Enlistment.RepoRoot, $"reset --hard");

ProcessResult checkoutResult = GitProcess.InvokeProcess(this.Enlistment.RepoRoot, $"merge {conflictTargetBranch}");
checkoutResult.Output.ShouldContain("Merge conflict");
Expand Down

0 comments on commit 089296f

Please sign in to comment.