Fix ArrayIndexOutOfBoundsException on initial commits

PatchSetInserter crashed if given a new patch set for an initial
commit in a repository. The lack of parents caused getParent(0)
to throw an exception.

Instead require the two commits to have the same number of parents.
If that number is 0, the commits are NO_CODE_CHANGE. If >0 then
test only the first parent as before.

Change-Id: I6cefd5f16bf866062b247143a64d3eac92710192
1 file changed