Skip to content

Commit 4396e00

Browse files
committed
Fix Code Format warning
1 parent 14c1efc commit 4396e00

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public void GetBranchesContainingCommitThrowsDirectlyOnNullCommit()
209209
var fixtureRepository = fixture.Repository.ToGitRepository();
210210
var gitRepoMetadataProvider = new RepositoryStore(this.log, fixtureRepository);
211211

212-
Assert.Throws<ArgumentNullException>(() => gitRepoMetadataProvider.GetBranchesContainingCommit(null));
212+
Assert.Throws<ArgumentNullException>(() => gitRepoMetadataProvider.GetBranchesContainingCommit(null!));
213213
}
214214

215215
[Test]

src/GitVersion.Core/Core/RepositoryStore.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ private static bool IsReleaseBranch(INamedReference branch, IEnumerable<KeyValue
147147

148148
public IEnumerable<IBranch> GetBranchesContainingCommit(ICommit commit, IEnumerable<IBranch>? branches = null, bool onlyTrackedBranches = false)
149149
{
150+
commit.NotNull();
151+
150152
var branchesContainingCommitFinder = new BranchesContainingCommitFinder(this.repository, this.log);
151153
return branchesContainingCommitFinder.GetBranchesContainingCommit(commit, branches, onlyTrackedBranches);
152154
}

0 commit comments

Comments
 (0)