private void EnqueueEntriesFromLsTree(string line) { LsTreeEntry entry = LsTreeEntry.ParseFromLsTreeLine(line); if (entry != null) { this.entryQueue.Add(entry); } }
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); }
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); }