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

Commit 7d87a40

Browse files
committed
Add Guard.ArgumentIsGitPath to appropriate methods
1 parent 346bfe1 commit 7d87a40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GitHub.App/Services/GitClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public Task<string> ExtractFile(IRepository repository, string commitSha, string
279279
{
280280
Guard.ArgumentNotNull(repository, nameof(repository));
281281
Guard.ArgumentNotEmptyString(commitSha, nameof(commitSha));
282-
Guard.ArgumentNotEmptyString(fileName, nameof(fileName));
282+
Guard.ArgumentIsGitPath(fileName, nameof(fileName));
283283

284284
return Task.Run(() =>
285285
{
@@ -298,7 +298,7 @@ public Task<byte[]> ExtractFileBinary(IRepository repository, string commitSha,
298298
{
299299
Guard.ArgumentNotNull(repository, nameof(repository));
300300
Guard.ArgumentNotEmptyString(commitSha, nameof(commitSha));
301-
Guard.ArgumentNotEmptyString(fileName, nameof(fileName));
301+
Guard.ArgumentIsGitPath(fileName, nameof(fileName));
302302

303303
return Task.Run(() =>
304304
{
@@ -327,7 +327,7 @@ public Task<byte[]> ExtractFileBinary(IRepository repository, string commitSha,
327327
public Task<bool> IsModified(IRepository repository, string path, byte[] contents)
328328
{
329329
Guard.ArgumentNotNull(repository, nameof(repository));
330-
Guard.ArgumentNotEmptyString(path, nameof(path));
330+
Guard.ArgumentIsGitPath(path, nameof(path));
331331

332332
return Task.Run(() =>
333333
{

0 commit comments

Comments
 (0)