internal static void ParseSummary(IStringReader reader, ChangeSetDetail detail) { reader.SkipWhitespace(); while (!reader.Done) { string line = reader.ReadLine(); if (ParserHelpers.IsSingleNewLine(line)) { break; } else if (line.Contains('\t')) { // n n path string[] parts = line.Split('\t'); int insertions; Int32.TryParse(parts[0], out insertions); int deletions; Int32.TryParse(parts[1], out deletions); string path = parts[2].TrimEnd(); detail.Files[path] = new FileInfo { Insertions = insertions, Deletions = deletions, Binary = parts[0] == "-" && parts[1] == "-" }; } else { // n files changed, n insertions(+), n deletions(-) ParserHelpers.ParseSummaryFooter(line, detail); } } }
internal static void ParseSummary(IStringReader reader, ChangeSetDetail detail) { while (!reader.Done) { string line = reader.ReadLine(); if (line.Contains('|')) { string[] parts = line.Split('|'); string path = parts[0].Trim(); // TODO: Figure out a way to get this information detail.Files[path] = new FileInfo(); } else { // n files changed, n insertions(+), n deletions(-) ParserHelpers.ParseSummaryFooter(line, detail); } } }