/// <summary>
            /// Adjusts the modifed paths and placeholders list for an index entry.
            /// </summary>
            /// <param name="gitIndexEntry">Index entry</param>
            /// <param name="filePlaceholders">
            /// Dictionary of file placeholders.  AddEntryToModifiedPathsAndRemoveFromPlaceholdersIfNeeded will
            /// remove enties from filePlaceholders as they are found in the index.  After
            /// AddEntryToModifiedPathsAndRemoveFromPlaceholdersIfNeeded is called for all entries in the index
            /// filePlaceholders will contain only those placeholders that are not in the index.
            /// </param>
            private FileSystemTaskResult AddEntryToModifiedPathsAndRemoveFromPlaceholdersIfNeeded(
                GitIndexEntry gitIndexEntry,
                HashSet <string> filePlaceholders)
            {
                gitIndexEntry.BackgroundTask_ParsePath();
                string placeholderRelativePath = gitIndexEntry.BackgroundTask_GetPlatformRelativePath();

                FileSystemTaskResult result = FileSystemTaskResult.Success;

                if (!gitIndexEntry.SkipWorktree)
                {
                    // A git command (e.g. 'git reset --mixed') may have cleared a file's skip worktree bit without
                    // triggering an update to the projection. If git cleared the skip-worktree bit then git will
                    // be responsible for updating the file and we need to:
                    //    - Ensure this file is in GVFS's modified files database
                    //    - Remove this path from the placeholders list (if present)
                    result = this.projection.AddModifiedPath(placeholderRelativePath);

                    if (result == FileSystemTaskResult.Success)
                    {
                        if (filePlaceholders.Remove(placeholderRelativePath))
                        {
                            this.projection.RemoveFromPlaceholderList(placeholderRelativePath);
                        }
                    }
                }
                else
                {
                    filePlaceholders.Remove(placeholderRelativePath);
                }

                return(result);
            }
Esempio n. 2
0
        public void TopLevelPath()
        {
            string[]      pathParts  = new[] { ".gitignore" };
            GitIndexEntry indexEntry = this.SetupIndexEntry(".gitignore");

            this.TestPathParts(indexEntry, pathParts, hasSameParent: false);
        }
Esempio n. 3
0
        private GitIndexEntry SetupIndexEntry(string path)
        {
            GitIndexEntry indexEntry = new GitIndexEntry();

            this.ParsePathForIndexEntry(indexEntry, path, replaceIndex: 0);
            return(indexEntry);
        }
Esempio n. 4
0
        private void TestPathParts(GitIndexEntry indexEntry, string[] pathParts, bool hasSameParent)
        {
            if (this.buildingNewProjection)
            {
                indexEntry.BuildingProjection_HasSameParentAsLastEntry.ShouldEqual(hasSameParent, nameof(indexEntry.BuildingProjection_HasSameParentAsLastEntry));
                indexEntry.BuildingProjection_NumParts.ShouldEqual(pathParts.Length, nameof(indexEntry.BuildingProjection_NumParts));
            }

            for (int i = 0; i < pathParts.Length; i++)
            {
                if (this.buildingNewProjection)
                {
                    indexEntry.BuildingProjection_PathParts[i].ShouldNotBeNull();
                    indexEntry.BuildingProjection_PathParts[i].GetString().ShouldEqual(pathParts[i]);
                }
            }

            if (this.buildingNewProjection)
            {
                indexEntry.BuildingProjection_GetChildName().GetString().ShouldEqual(pathParts[pathParts.Length - 1]);
                indexEntry.BuildingProjection_GetGitRelativePath().ShouldEqual(string.Join("/", pathParts));
            }
            else
            {
                indexEntry.BackgroundTask_GetPlatformRelativePath().ShouldEqual(string.Join(Path.DirectorySeparatorChar.ToString(), pathParts));
            }
        }
Esempio n. 5
0
        public void TwoLevelPath()
        {
            string[]      pathParts  = new[] { "folder", "file.txt" };
            GitIndexEntry indexEntry = this.SetupIndexEntry(string.Join("/", pathParts));

            this.TestPathParts(indexEntry, pathParts, hasSameParent: false);
        }
Esempio n. 6
0
        private GitIndexEntry SetupIndexEntry(string path)
        {
            GitIndexEntry indexEntry = new GitIndexEntry(this.buildingNewProjection);

            this.ParsePathForIndexEntry(indexEntry, path, replaceIndex: 0);
            return(indexEntry);
        }
Esempio n. 7
0
 private void ParsePathForIndexEntry(GitIndexEntry indexEntry, string path, int replaceIndex)
 {
     byte[] pathBuffer = Encoding.ASCII.GetBytes(path);
     Buffer.BlockCopy(pathBuffer, 0, indexEntry.PathBuffer, 0, path.Length);
     indexEntry.PathLength   = path.Length;
     indexEntry.ReplaceIndex = replaceIndex;
     indexEntry.ParsePath();
 }
            private static FileSystemTaskResult ValidateIndexEntry(GitIndexEntry data)
            {
                if (data.PathLength <= 0 || data.PathBuffer[0] == 0)
                {
                    throw new InvalidDataException("Zero-length path found in index");
                }

                return(FileSystemTaskResult.Success);
            }
Esempio n. 9
0
        public void RemoveFolder()
        {
            string[]      pathParts  = new[] { "folder", "folder2", "file.txt" };
            GitIndexEntry indexEntry = this.SetupIndexEntry(string.Join("/", pathParts));

            this.TestPathParts(indexEntry, pathParts, hasSameParent: false);

            string[] pathParts2 = new[] { "folder", "file.txt" };
            this.ParsePathForIndexEntry(indexEntry, string.Join("/", pathParts2), replaceIndex: 8);
            this.TestPathParts(indexEntry, pathParts2, hasSameParent: false);
        }
Esempio n. 10
0
        public void TestComponentsWithSimilarNames()
        {
            string[]      pathParts  = new[] { "MergedComponents", "SDK", "FCIBBinaries.kml" };
            GitIndexEntry indexEntry = this.SetupIndexEntry(string.Join("/", pathParts));

            this.TestPathParts(indexEntry, pathParts, hasSameParent: false);

            string[] pathParts2 = new[] { "MergedComponents", "SDK", "FCIBBinaries", "TH2Legacy", "amd64", "mdmerge.exe" };
            this.ParsePathForIndexEntry(indexEntry, string.Join("/", pathParts2), replaceIndex: 17);
            this.TestPathParts(indexEntry, pathParts2, hasSameParent: false);
        }
Esempio n. 11
0
        public void ReplaceFileNameShorter()
        {
            string[]      pathParts  = new[] { "MergedComponents", "InstrumentedBinCatalogs", "dirs" };
            GitIndexEntry indexEntry = this.SetupIndexEntry(string.Join("/", pathParts));

            this.TestPathParts(indexEntry, pathParts, hasSameParent: false);

            string[] pathParts2 = new[] { "MergedComponents", "InstrumentedBinCatalogs", "pgi", "sources.dep" };
            this.ParsePathForIndexEntry(indexEntry, string.Join("/", pathParts2), replaceIndex: 41);
            this.TestPathParts(indexEntry, pathParts2, hasSameParent: false);
        }
Esempio n. 12
0
        private void ReplaceIndexEntryWith(TreeEntryChanges treeEntryChanges)
        {
            var indexEntry = new GitIndexEntry
            {
                Mode = (uint)treeEntryChanges.OldMode,
                oid  = treeEntryChanges.OldOid.Oid,
                Path = FilePathMarshaler.FromManaged(treeEntryChanges.OldPath),
            };

            Proxy.git_index_add(handle, indexEntry);
            Marshal.FreeHGlobal(indexEntry.Path);
        }
Esempio n. 13
0
        public void ReplaceNonASCIIFileName()
        {
            string[]      pathParts  = new[] { "توبر", "مارسأغ", "FCIBBinaries.kml" };
            string        path       = string.Join("/", pathParts);
            GitIndexEntry indexEntry = this.SetupIndexEntry(path);

            this.TestPathParts(indexEntry, pathParts, hasSameParent: false);

            string[] pathParts2 = new[] { "توبر", "مارسأغ", "FCIBBinaries.txt" };
            this.ParsePathForIndexEntry(indexEntry, string.Join("/", pathParts2), replaceIndex: Encoding.UTF8.GetByteCount(path) - 3);
            this.TestPathParts(indexEntry, pathParts2, hasSameParent: true);
        }
Esempio n. 14
0
        private void AddEntryToTheIndex(string path, ObjectId id, Mode mode)
        {
            var indexEntry = new GitIndexEntry
            {
                Mode = (uint)mode,
                Id   = id.Oid,
                Path = StrictFilePathMarshaler.FromManaged(path),
            };

            Proxy.git_index_add(handle, indexEntry);
            EncodingMarshaler.Cleanup(indexEntry.Path);
        }
Esempio n. 15
0
        public void TestComponentsWithSimilarNonASCIINames()
        {
            string[]      pathParts  = new[] { "توبر", "مارسأغ", "FCIBBinaries.kml" };
            string        path       = string.Join("/", pathParts);
            GitIndexEntry indexEntry = this.SetupIndexEntry(path);

            this.TestPathParts(indexEntry, pathParts, hasSameParent: false);

            string[] pathParts2 = new[] { "توبر", "مارسأغ", "FCIBBinaries", "TH2Legacy", "amd64", "mdmerge.exe" };
            this.ParsePathForIndexEntry(indexEntry, string.Join("/", pathParts2), replaceIndex: Encoding.UTF8.GetByteCount(path) - 4);
            this.TestPathParts(indexEntry, pathParts2, hasSameParent: false);
        }
Esempio n. 16
0
        private void ReplaceIndexEntryWith(TreeEntryChanges treeEntryChanges)
        {
            var indexEntry = new GitIndexEntry
            {
                Mode = (uint)treeEntryChanges.OldMode,
                Id   = treeEntryChanges.OldOid.Oid,
                Path = StrictFilePathMarshaler.FromManaged(treeEntryChanges.OldPath),
            };

            Proxy.git_index_add(handle, indexEntry);
            EncodingMarshaler.Cleanup(indexEntry.Path);
        }
Esempio n. 17
0
        private void TestPathParts(GitIndexEntry indexEntry, string[] pathParts, bool hasSameParent)
        {
            indexEntry.HasSameParentAsLastEntry.ShouldEqual(hasSameParent, nameof(indexEntry.HasSameParentAsLastEntry));
            indexEntry.NumParts.ShouldEqual(pathParts.Length, nameof(indexEntry.NumParts));
            for (int i = 0; i < pathParts.Length; i++)
            {
                indexEntry.PathParts[i].ShouldNotBeNull();
                indexEntry.PathParts[i].GetString().ShouldEqual(pathParts[i]);
            }

            indexEntry.GetChildName().GetString().ShouldEqual(pathParts[pathParts.Length - 1]);
            indexEntry.GetFullPath().ShouldEqual(string.Join("/", pathParts));
        }
Esempio n. 18
0
        internal static IndexEntry CreateFromPtr(Repository repo, IndexEntrySafeHandle handle)
        {
            GitIndexEntry entry = handle.MarshalAsGitIndexEntry();

            FilePath path = (string)marshaler.MarshalNativeToManaged(entry.Path);

            return(new IndexEntry
            {
                Path = path.Native,
                Id = new ObjectId(entry.oid),
                state = () => repo.Index.RetrieveStatus(path.Native)
            });
        }
Esempio n. 19
0
        public void CreateGitRepository()
        {
            string dir  = GetTempPath();
            string file = Path.Combine(dir, "file");

            using (GitRepository repo = GitRepository.Create(dir))
            {
                Assert.That(repo, Is.Not.Null);
                Assert.That(repo.IsEmpty, Is.True);
                Assert.That(repo.IsBare, Is.False);
                Assert.That(repo.RepositoryDirectory, Is.EqualTo(Path.Combine(dir, GitClient.AdministrativeDirectoryName)));
                Assert.That(repo.WorkingCopyDirectory, Is.EqualTo(dir));

                GitConfiguration config = repo.Configuration;

                Assert.That(config, Is.Not.Null);

                GitIndex index = repo.Index;
                Assert.That(index, Is.Not.Null);
                //repo.SetIndex(index);

                GitObjectDatabase odb = repo.ObjectDatabase;
                Assert.That(odb, Is.Not.Null);
                //repo.SetObjectDatabase(odb);

                File.WriteAllText(file, "qqq");

                repo.Index.Add("file");

                Assert.That(repo.Configuration.Set(GitConfigurationLevel.Repository, GitConfigurationKeys.UserName, "Tester"));
                Assert.That(repo.Configuration.Set(GitConfigurationLevel.Repository, GitConfigurationKeys.UserEmail, "[email protected]"));

                string v;
                Assert.That(repo.Configuration.TryGetString(GitConfigurationKeys.UserName, out v));
                Assert.That(v, Is.EqualTo("Tester"));

                Assert.That(repo.Configuration.TryGetString(GitConfigurationKeys.UserEmail, out v));
                Assert.That(v, Is.EqualTo("[email protected]"));

                Assert.That(index.Contains("file"));
                GitIndexEntry entry = repo.Index["file"];

                Assert.That(entry, Is.Not.Null);
                Assert.That(entry.FileSize, Is.EqualTo(3));
                Assert.That(entry.Id, Is.EqualTo(new GitId("E5A49F32170B89EE4425C4AB09E70DFCDB93E174")));

                index.Reload();

                Assert.That(index.Contains("file"), Is.False);
            }
        }
            private FileSystemTaskResult AddToProjection(GitIndexEntry data)
            {
                if (data.SkipWorktree || data.MergeState == MergeStage.Yours)
                {
                    data.ParsePath();
                    this.projection.AddItemFromIndexEntry(data);
                }
                else
                {
                    data.ClearLastParent();
                }

                return(FileSystemTaskResult.Success);
            }
Esempio n. 21
0
        public void ClearLastParent()
        {
            string[]      pathParts  = new[] { "folder", "one", "file.txt" };
            GitIndexEntry indexEntry = this.SetupIndexEntry(string.Join("/", pathParts));

            this.TestPathParts(indexEntry, pathParts, hasSameParent: false);

            string[] pathParts2 = new[] { "folder", "one", "newfile.txt" };
            this.ParsePathForIndexEntry(indexEntry, string.Join("/", pathParts2), replaceIndex: 12);
            this.TestPathParts(indexEntry, pathParts2, hasSameParent: true);
            indexEntry.LastParent = new FolderData();
            indexEntry.ClearLastParent();
            indexEntry.HasSameParentAsLastEntry.ShouldBeFalse();
            indexEntry.LastParent.ShouldBeNull();
        }
            private FileSystemTaskResult AddIndexEntryToProjection(GitIndexEntry data)
            {
                // Never want to project the common ancestor even if the skip worktree bit is on
                if ((data.MergeState != MergeStage.CommonAncestor && data.SkipWorktree) || data.MergeState == MergeStage.Yours)
                {
                    data.BuildingProjection_ParsePath();
                    this.projection.AddItemFromIndexEntry(data);
                }
                else
                {
                    data.ClearLastParent();
                }

                return(FileSystemTaskResult.Success);
            }
            private FileSystemTaskResult AddToModifiedFiles(GitIndexEntry data)
            {
                if (!data.SkipWorktree)
                {
                    // A git command (e.g. 'git reset --mixed') may have cleared a file's skip worktree bit without
                    // triggering an update to the projection.  Ensure this file is in GVFS's modified files database
                    data.ParsePath();
                    return(this.projection.AddModifiedPath(data.GetFullPath()));
                }
                else
                {
                    data.ClearLastParent();
                }

                return(FileSystemTaskResult.Success);
            }
Esempio n. 24
0
        private void ParsePathForIndexEntry(GitIndexEntry indexEntry, string path, int replaceIndex)
        {
            byte[] pathBuffer = Encoding.UTF8.GetBytes(path);
            Buffer.BlockCopy(pathBuffer, 0, indexEntry.PathBuffer, 0, pathBuffer.Length);
            indexEntry.PathLength   = pathBuffer.Length;
            indexEntry.ReplaceIndex = replaceIndex;

            if (this.buildingNewProjection)
            {
                indexEntry.BuildingProjection_ParsePath();
            }
            else
            {
                indexEntry.BackgroundTask_ParsePath();
            }
        }
Esempio n. 25
0
        private void RestorePotentialPreviousVersionOfHeadIntoIndex(string relativePath)
        {
            TreeEntry treeEntry = repo.Head[relativePath];

            if (treeEntry == null || treeEntry.Type != GitObjectType.Blob)
            {
                return;
            }

            var indexEntry = new GitIndexEntry
            {
                Mode = (uint)treeEntry.Mode,
                oid  = treeEntry.TargetId.Oid,
                Path = utf8Marshaler.MarshalManagedToNative(relativePath),
            };

            Ensure.Success(NativeMethods.git_index_add2(handle, indexEntry));
            utf8Marshaler.CleanUpNativeData(indexEntry.Path);
        }
Esempio n. 26
0
        internal static IndexEntry BuildFromPtr(Repository repo, IndexEntrySafeHandle handle)
        {
            if (handle == null || handle.IsZero)
            {
                return(null);
            }

            GitIndexEntry entry = handle.MarshalAsGitIndexEntry();

            var path = FilePathMarshaler.FromNative(entry.Path);

            return(new IndexEntry
            {
                Path = path.Native,
                Id = entry.oid,
                StageLevel = Proxy.git_index_entry_stage(handle),
                Mode = (Mode)entry.Mode
            });
        }
Esempio n. 27
0
        internal static IndexEntry BuildFromPtr(IndexEntrySafeHandle handle)
        {
            if (handle == null || handle.IsZero)
            {
                return(null);
            }

            GitIndexEntry entry = handle.MarshalAsGitIndexEntry();

            FilePath path = LaxFilePathMarshaler.FromNative(entry.Path);

            return(new IndexEntry
            {
                Path = path.Native,
                Id = entry.Id,
                StageLevel = Proxy.git_index_entry_stage(handle),
                Mode = (Mode)entry.Mode,
                AssumeUnchanged = (GitIndexEntry.GIT_IDXENTRY_VALID & entry.Flags) == GitIndexEntry.GIT_IDXENTRY_VALID
            });
        }
            private void ReadPath(GitIndexEntry indexEntryData, int replaceIndex, int byteCount)
            {
                if (this.nextByteIndex + byteCount <= PageSize)
                {
                    Buffer.BlockCopy(this.page, this.nextByteIndex, indexEntryData.PathBuffer, replaceIndex, byteCount);
                    this.Skip(byteCount);
                }
                else
                {
                    int availableBytes = PageSize - this.nextByteIndex;
                    int remainingBytes = byteCount - availableBytes;

                    if (availableBytes != 0)
                    {
                        this.ReadPath(indexEntryData, replaceIndex, availableBytes);
                    }

                    this.ReadNextPage();
                    this.ReadPath(indexEntryData, replaceIndex + availableBytes, remainingBytes);
                }
            }
            private void ReadSha(GitIndexEntry indexEntryData)
            {
                if (this.nextByteIndex + 20 <= PageSize)
                {
                    Buffer.BlockCopy(this.page, this.nextByteIndex, indexEntryData.Sha, 0, 20);
                    this.Skip(20);
                }
                else
                {
                    int availableBytes = PageSize - this.nextByteIndex;
                    int remainingBytes = 20 - availableBytes;

                    if (availableBytes > 0)
                    {
                        Buffer.BlockCopy(this.page, this.nextByteIndex, indexEntryData.Sha, 0, availableBytes);
                    }

                    this.ReadNextPage();
                    Buffer.BlockCopy(this.page, this.nextByteIndex, indexEntryData.Sha, availableBytes, remainingBytes);
                    this.Skip(remainingBytes);
                }
            }
            /// <summary>
            /// Takes an action on a GitIndexEntry using the index in indexStream
            /// </summary>
            /// <param name="indexStream">Stream for reading a git index file</param>
            /// <param name="entryAction">Action to take on each GitIndexEntry from the index</param>
            /// <returns>
            /// FileSystemTaskResult indicating success or failure of the specified action
            /// </returns>
            /// <remarks>
            /// Only the AddToModifiedFiles method because it updates the modified paths file can result
            /// in TryIndexAction returning a FileSystemTaskResult other than Success.  All other actions result in success (or an exception in the
            /// case of a corrupt index)
            /// </remarks>
            private FileSystemTaskResult ParseIndex(
                ITracer tracer,
                Stream indexStream,
                GitIndexEntry resuableParsedIndexEntry,
                Func <GitIndexEntry, FileSystemTaskResult> entryAction)
            {
                this.indexStream          = indexStream;
                this.indexStream.Position = 0;
                this.ReadNextPage();

                if (this.page[0] != 'D' ||
                    this.page[1] != 'I' ||
                    this.page[2] != 'R' ||
                    this.page[3] != 'C')
                {
                    throw new InvalidDataException("Incorrect magic signature for index: " + string.Join(string.Empty, this.page.Take(4).Select(c => (char)c)));
                }

                this.Skip(4);
                uint indexVersion = this.ReadFromIndexHeader();

                if (indexVersion != 4)
                {
                    throw new InvalidDataException("Unsupported index version: " + indexVersion);
                }

                uint entryCount = this.ReadFromIndexHeader();

                // Don't want to flood the logs on large indexes so only log every 500ms
                const int LoggingTicksThreshold = 5000000;
                long      nextLogTicks          = DateTime.UtcNow.Ticks + LoggingTicksThreshold;

                SortedFolderEntries.InitializePools(tracer, entryCount);
                LazyUTF8String.InitializePools(tracer, entryCount);

                resuableParsedIndexEntry.ClearLastParent();
                int previousPathLength = 0;

                bool parseMode = GVFSPlatform.Instance.FileSystem.SupportsFileMode;
                FileSystemTaskResult result = FileSystemTaskResult.Success;

                for (int i = 0; i < entryCount; i++)
                {
                    if (parseMode)
                    {
                        this.Skip(26);

                        // 4-bit object type
                        //     valid values in binary are 1000(regular file), 1010(symbolic link) and 1110(gitlink)
                        // 3-bit unused
                        // 9-bit unix permission. Only 0755 and 0644 are valid for regular files. (Legacy repos can also contain 664)
                        //     Symbolic links and gitlinks have value 0 in this field.
                        ushort indexFormatTypeAndMode = this.ReadUInt16();

                        FileTypeAndMode typeAndMode = new FileTypeAndMode(indexFormatTypeAndMode);

                        switch (typeAndMode.Type)
                        {
                        case FileType.Regular:
                            if (typeAndMode.Mode != FileMode755 &&
                                typeAndMode.Mode != FileMode644 &&
                                typeAndMode.Mode != FileMode664)
                            {
                                throw new InvalidDataException($"Invalid file mode {typeAndMode.GetModeAsOctalString()} found for regular file in index");
                            }

                            break;

                        case FileType.SymLink:
                        case FileType.GitLink:
                            if (typeAndMode.Mode != 0)
                            {
                                throw new InvalidDataException($"Invalid file mode {typeAndMode.GetModeAsOctalString()} found for link file({typeAndMode.Type:X}) in index");
                            }

                            break;

                        default:
                            throw new InvalidDataException($"Invalid file type {typeAndMode.Type:X} found in index");
                        }

                        resuableParsedIndexEntry.TypeAndMode = typeAndMode;

                        this.Skip(12);
                    }
                    else
                    {
                        this.Skip(40);
                    }

                    this.ReadSha(resuableParsedIndexEntry);

                    ushort flags = this.ReadUInt16();
                    if (flags == 0)
                    {
                        throw new InvalidDataException("Invalid flags found in index");
                    }

                    resuableParsedIndexEntry.MergeState = (MergeStage)((flags >> 12) & 3);
                    bool isExtended = (flags & ExtendedBit) == ExtendedBit;
                    resuableParsedIndexEntry.PathLength = (ushort)(flags & 0xFFF);

                    resuableParsedIndexEntry.SkipWorktree = false;
                    if (isExtended)
                    {
                        ushort extendedFlags = this.ReadUInt16();
                        resuableParsedIndexEntry.SkipWorktree = (extendedFlags & SkipWorktreeBit) == SkipWorktreeBit;
                    }

                    int replaceLength = this.ReadReplaceLength();
                    resuableParsedIndexEntry.ReplaceIndex = previousPathLength - replaceLength;
                    int bytesToRead = resuableParsedIndexEntry.PathLength - resuableParsedIndexEntry.ReplaceIndex + 1;
                    this.ReadPath(resuableParsedIndexEntry, resuableParsedIndexEntry.ReplaceIndex, bytesToRead);
                    previousPathLength = resuableParsedIndexEntry.PathLength;

                    result = entryAction.Invoke(resuableParsedIndexEntry);
                    if (result != FileSystemTaskResult.Success)
                    {
                        return(result);
                    }

                    if (DateTime.UtcNow.Ticks > nextLogTicks)
                    {
                        tracer.RelatedInfo($"{i}/{entryCount} index entries parsed.");
                        nextLogTicks = DateTime.UtcNow.Ticks + LoggingTicksThreshold;
                    }
                }

                tracer.RelatedInfo($"Finished parsing {entryCount} index entries.");
                return(result);
            }