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); }
private static string ConvertPathToUtf8Path(string relativePath) { return(GitPathConverter.ConvertPathOctetsToUtf8(relativePath.Trim('"')).Replace(GVFSConstants.GitPathSeparator, Path.DirectorySeparatorChar)); }
private static string ConvertPathToAbsoluteUtf8Path(string repoRoot, string relativePath) { return(Path.Combine(repoRoot, GitPathConverter.ConvertPathOctetsToUtf8(relativePath.Trim('"')).Replace('/', '\\'))); }