for ( final ObjectId src : commits ) {
final RevCommit srcCommit = revWalk.parseCommit( src );
// get the parent of the commit to cherry-pick
if ( srcCommit.getParentCount() != 1 ) {
throw new IOException( new MultipleParentsNotAllowedException(
MessageFormat.format(
JGitText.get().canOnlyCherryPickCommitsWithOneParent,
srcCommit.name(),
Integer.valueOf( srcCommit.getParentCount() ) ) ) );
}