public static GitChangeInfo Parse(string diffTreeLine) { var match = DiffTreePattern.Match(diffTreeLine); if (!match.Success) { throw new Exception("Invalid input."); } Debug(diffTreeLine, match, DiffTreePattern); return new GitChangeInfo(match); }
public static IEnumerable <GitChangeInfo> GetChangedFiles(TextReader reader) { string line; while (null != (line = GetDiffTreeLine(reader))) { var change = GitChangeInfo.Parse(line); if (FileMode.GitLink == change.NewMode) { continue; } yield return(change); } }