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