Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit a2d0336

Browse files
committed
LibGit2Sharp likes empty string arrays better than null
1 parent 10cd31e commit a2d0336

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/GitTools.Core.Tests/Git/GitRepositoryHelperTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void UpdatesCurrentBranch()
8787
// Advance remote
8888
fixture.Repository.Checkout("develop");
8989
var advancedCommit = fixture.Repository.MakeACommit();
90-
Commands.Fetch((Repository)localFixture.Repository, localFixture.Repository.Network.Remotes["origin"].Name, null, null, null);
90+
Commands.Fetch((Repository)localFixture.Repository, localFixture.Repository.Network.Remotes["origin"].Name, new string[0], null, null);
9191
localFixture.Repository.Checkout(advancedCommit.Sha);
9292
localFixture.Repository.DumpGraph();
9393
GitRepositoryHelper.NormalizeGitDirectory(localFixture.RepositoryPath, new AuthenticationInfo(), noFetch: false, currentBranch: "ref/heads/develop");

src/GitTools.Core.Tests/GitRepositoryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public void UpdatesCurrentBranch()
116116
// Advance remote
117117
fixture.Repository.Checkout("develop");
118118
var advancedCommit = fixture.Repository.MakeACommit();
119-
Commands.Fetch((Repository)localFixture.Repository, localFixture.Repository.Network.Remotes["origin"].Name, null, null, null);
119+
Commands.Fetch((Repository)localFixture.Repository, localFixture.Repository.Network.Remotes["origin"].Name, new string[0], null, null);
120120
localFixture.Repository.Checkout(advancedCommit.Sha);
121121
GitRepositoryHelper.NormalizeGitDirectory(localFixture.RepositoryPath, new AuthenticationInfo(), noFetch: false, currentBranch: "ref/heads/develop");
122122

src/GitTools.Core/GitTools.Core.Shared/Git/Helpers/GitRepositoryHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static void NormalizeGitDirectory(string gitDirectory, AuthenticationInfo
3636
Log.Info(string.Format("Fetching from remote '{0}' using the following refspecs: {1}.",
3737
remote.Name, string.Join(", ", remote.FetchRefSpecs.Select(r => r.Specification))));
3838
var fetchOptions = BuildFetchOptions(authentication.Username, authentication.Password);
39-
Commands.Fetch(repo, remote.Name, null, fetchOptions, null);
39+
Commands.Fetch(repo, remote.Name, new string[0], fetchOptions, null);
4040
}
4141

4242
EnsureLocalBranchExistsForCurrentBranch(repo, currentBranch);

0 commit comments

Comments
 (0)