Skip to content

Commit

Permalink
chore: added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
woutervanranst committed Apr 8, 2024
1 parent dd28c75 commit ab3c9e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Arius.Core/Repositories/Repository.PointerFileEntries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ private async IAsyncEnumerable<PointerFileEntry> GetPointerFileEntriesAtVersionA

// Apply the filters from the filter object
if (relativePathFilter is not null)
entries = entries.Where(entry => entry.RelativeName.StartsWith(relativePathFilter) && !entry.RelativeName.Substring(relativePathFilter.Length).Contains("/"));
entries = entries.Where(entry => entry.RelativeName.StartsWith(relativePathFilter) &&
entry.RelativeName.Substring(relativePathFilter.Length).IndexOf('/') == 0); // get the PFEs that are DIRECTLY in the subdirectory (not in nested subdirectories)

// Perform the grouping and ordering within the same query to limit the amount of data pulled into memory
var groupedAndOrdered = entries
Expand All @@ -153,7 +154,7 @@ private async IAsyncEnumerable<PointerFileEntry> GetPointerFileEntriesAtVersionA

await foreach (var entry in groupedAndOrdered.AsAsyncEnumerable())
if (entry != null)
yield return entry;
yield return entry; // TODO to doublecheck - are IsDeleted files also returned?

//private async Task<IEnumerable<PointerFileEntry>> GetPointerFileEntriesAtVersionAsync(DateTime versionUtc)
//{
Expand Down

0 comments on commit ab3c9e7

Please sign in to comment.