* Reads normal diff hunks.
*/
private void readNormalPatchContent(SinglePatch patch) throws IOException, PatchException
{
List<Hunk> hunks = new ArrayList<Hunk>();
Hunk hunk = null;
Matcher m;
for (; ; )
{
String line = readPatchLine();
if (line == null || line.startsWith("Index:"))
{
unreadPatchLine();
break;
}
if ((m = normalAddRangePattern.matcher(line)).matches())
{
hunk = new Hunk();
hunks.add(hunk);
parseNormalRange(hunk, m);
}
else if ((m = normalChangeRangePattern.matcher(line)).matches())
{
hunk = new Hunk();
hunks.add(hunk);
parseNormalRange(hunk, m);
}
else if ((m = normalDeleteRangePattern.matcher(line)).matches())
{
hunk = new Hunk();
hunks.add(hunk);
parseNormalRange(hunk, m);
}
else
{