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