public void ProcessPart(PatchPart part) { if (DiffsRemaining == 1 && UsingLine != null) { ChunkWithUsing !.FlipFirstCharacter(UsingLine.Value, '-'); DiffsRemaining -= 1; } }
PatchPart ParsePart() { PatchPart part = new PatchPart(Lines.Skip(Index).Take(4).ToList()); Expect("diff --git"); Advance(3); Expect("+++"); part.FileName = Current.Split(new char [] { '/' }, 2) [1]; Advance(); foreach (var chunk in ParsePatch()) { part.Add(chunk); } return(part); }
public void Add(PatchPart parth) => Parts.Add(parth);