Skip to content

Commit

Permalink
Add comment in code to explain behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
DomLatr authored and louis-z committed Jan 7, 2025
1 parent 20deb33 commit 8cb9bae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion NGitLab.Mock/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,10 @@ internal IEnumerable<Tree> GetTree(RepositoryGetTreeOptions repositoryGetTreeOpt

if (tree is null)
{
// Based on test GetAllTreeObjectsAtInvalidPath(), default behavior for
// GetTree() when Path doesn't exists should be to return empty
if (!string.IsNullOrWhiteSpace(repositoryGetTreeOptions.Path))
return[];
return [];

throw new GitLabNotFoundException();
}
Expand Down

0 comments on commit 8cb9bae

Please sign in to comment.