Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Git 2.23.0 #71

Merged
merged 2 commits into from
Aug 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Scalar.Build/Scalar.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup Label="Parameters">
<ScalarVersion>0.2.173.2</ScalarVersion>
<GitPackageVersion>2.20190806.1</GitPackageVersion>
<GitPackageVersion>2.20190820.1</GitPackageVersion>
</PropertyGroup>

<PropertyGroup Label="DefaultSettings">
Expand Down
8 changes: 5 additions & 3 deletions Scalar.FunctionalTests/Tests/GitCommands/GitCommandsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ public void ChangeBranchAndCherryPickIntoAnotherBranch()

this.ValidateGitCommand("checkout " + this.ControlGitRepo.Commitish);
this.ValidateGitCommand("checkout -b tests/functional/ChangeBranchesAndCherryPickIntoAnotherBranch_2");
this.RunGitCommand("cherry-pick DeleteForCherryPick");
this.RunGitCommand("cherry-pick -q DeleteForCherryPick");
}

[TestCase]
Expand All @@ -911,7 +911,8 @@ public void ChangeBranchAndMergeRebaseOnAnotherBranch()
this.ValidateGitCommand("add .");
this.RunGitCommand("commit -m \"Edit for ChangeBranchAndMergeRebaseOnAnotherBranch first branch\"");

this.RunGitCommand("rebase --merge tests/functional/ChangeBranchAndMergeRebaseOnAnotherBranch_1");
this.RunGitCommand("rebase --merge tests/functional/ChangeBranchAndMergeRebaseOnAnotherBranch_1", ignoreErrors: true);
this.ValidateGitCommand("rev-parse HEAD^{{tree}}");
}

[TestCase]
Expand All @@ -934,7 +935,8 @@ public void ChangeBranchAndRebaseOnAnotherBranch()
this.ValidateGitCommand("add .");
this.RunGitCommand("commit -m \"Edit for ChangeBranchAndRebaseOnAnotherBranch first branch\"");

this.ValidateGitCommand("rebase tests/functional/ChangeBranchAndRebaseOnAnotherBranch_1");
this.RunGitCommand("rebase tests/functional/ChangeBranchAndRebaseOnAnotherBranch_1", ignoreErrors: true);
this.ValidateGitCommand("rev-parse HEAD^{{tree}}");
}

[TestCase]
Expand Down
21 changes: 20 additions & 1 deletion Scalar.FunctionalTests/Tests/GitCommands/GitRepoTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,26 @@ protected void FileContentsShouldMatch(params string[] filePathPaths)
string filePath = Path.Combine(filePathPaths);
string virtualFilePath = Path.Combine(this.Enlistment.RepoRoot, filePath);
string controlFilePath = Path.Combine(this.ControlGitRepo.RootPath, filePath);
virtualFilePath.ShouldBeAFile(this.FileSystem).WithContents(controlFilePath.ShouldBeAFile(this.FileSystem).WithContents());
bool virtualExists = File.Exists(virtualFilePath);
bool controlExists = File.Exists(controlFilePath);

if (virtualExists)
{
if (controlExists)
{
virtualFilePath.ShouldBeAFile(this.FileSystem)
.WithContents(controlFilePath.ShouldBeAFile(this.FileSystem)
.WithContents());
}
else
{
virtualExists.ShouldEqual(controlExists, $"{virtualExists} exists, but {controlExists} does not");
}
}
else if (controlExists)
{
virtualExists.ShouldEqual(controlExists, $"{virtualExists} does not exist, but {controlExists} does");
}
}

protected void FileShouldHaveCaseMatchingName(string caseSensitiveFilePath)
Expand Down
7 changes: 5 additions & 2 deletions Scalar.FunctionalTests/Tools/GitHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,11 @@ public static void ValidateGitCommand(
string controlRepoRoot = controlGitRepo.RootPath;
string scalarRepoRoot = enlistment.RepoRoot;

ProcessResult expectedResult = GitProcess.InvokeProcess(controlRepoRoot, command);
ProcessResult actualResult = GitHelpers.InvokeGitAgainstScalarRepo(scalarRepoRoot, command);
Dictionary<string, string> environmentVariables = new Dictionary<string, string>();
environmentVariables["GIT_QUIET"] = "true";

ProcessResult expectedResult = GitProcess.InvokeProcess(controlRepoRoot, command, environmentVariables);
ProcessResult actualResult = GitHelpers.InvokeGitAgainstScalarRepo(scalarRepoRoot, command, environmentVariables);

ErrorsShouldMatch(command, expectedResult, actualResult);
actualResult.Output.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)
Expand Down