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

Commit 8c5d1f7

Browse files
committed
Add guards to HasChangesInWorkingDirectory
1 parent 7006897 commit 8c5d1f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/GitHub.App/Services/GitHubContextService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,10 @@ public string FindObjectishForTFSTempFile(string tempFile)
386386
/// <inheritdoc/>
387387
public bool HasChangesInWorkingDirectory(string repositoryDir, string commitish, string path)
388388
{
389+
Guard.ArgumentNotNull(path, nameof(repositoryDir));
390+
Guard.ArgumentNotNull(path, nameof(commitish));
391+
Guard.ArgumentIsGitPath(path, nameof(path));
392+
389393
using (var repo = gitService.GetRepository(repositoryDir))
390394
{
391395
var commit = repo.Lookup<Commit>(commitish);

0 commit comments

Comments
 (0)