throws MultipleParentsNotAllowedException, MissingObjectException,
IOException {
final RevCommit srcParent;
if (mainlineParentNumber == null) {
if (srcCommit.getParentCount() != 1)
throw new MultipleParentsNotAllowedException(
MessageFormat.format(
JGitText.get().canOnlyCherryPickCommitsWithOneParent,
srcCommit.name(),
Integer.valueOf(srcCommit.getParentCount())));
srcParent = srcCommit.getParent(0);