private int ParseDiffLine(string text)
{
if (text == null)
return -1;
Match m = DiffDecoder.Match(text);
if (m.Success)
{
int line = Int32.Parse(m.Groups[1].Value);
// 'a' adds AFTER the line, but we do processing once we get to the line.
// So we need to really get to the next line.
if (m.Groups[3].Value.Equals("a"))
line += 1;
return line;
}
return -1;
}