Ejemplo n.º 1
0
        private void EnqueueEntriesFromLsTree(string line)
        {
            LsTreeEntry entry = LsTreeEntry.ParseFromLsTreeLine(line);

            if (entry != null)
            {
                this.entryQueue.Add(entry);
            }
        }
Ejemplo n.º 2
0
            public static LsTreeEntry ParseFromLsTreeLine(string line)
            {
                if (DiffTreeResult.IsLsTreeLineOfType(line, DiffTreeResult.BlobMarker))
                {
                    LsTreeEntry blobEntry = new LsTreeEntry();
                    blobEntry.Sha      = line.Substring(DiffTreeResult.TypeMarkerStartIndex + DiffTreeResult.BlobMarker.Length, GVFSConstants.ShaStringLength);
                    blobEntry.Filename = GitPathConverter.ConvertPathOctetsToUtf8(line.Substring(line.LastIndexOf("\t") + 1).Trim('"'));

                    return(blobEntry);
                }

                return(null);
            }
Ejemplo n.º 3
0
            public static LsTreeEntry ParseFromLsTreeLine(string line)
            {
                int blobIndex = line.IndexOf(GitCatFileProcess.BlobMarker);

                if (blobIndex >= 0)
                {
                    LsTreeEntry blobEntry = new LsTreeEntry();
                    blobEntry.Sha      = line.Substring(blobIndex + GitCatFileProcess.BlobMarker.Length, GVFSConstants.ShaStringLength);
                    blobEntry.Filename = GitPathConverter.ConvertPathOctetsToUtf8(line.Substring(line.LastIndexOf("\t") + 1).Trim('"'));

                    return(blobEntry);
                }

                return(null);
            }