I checked the code and the error is coming from the file gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java
The code snippest is below:
RevCommit cherryPickCommit;
ObjectInserter oi = git.newObjectInserter();
try {
ProjectState projectState = refControl.getProjectControl().getProjectState();
cherryPickCommit =
mergeUtilFactory.create(projectState).createCherryPickFromCommit(git, oi, mergeTip,
commitToCherryPick, committerIdent, commitMessage, revWalk);
} finally {
oi.release();
}
if (cherryPickCommit == null) {
throw new MergeException(
"Could not create a merge commit during the cherry pick");
}
It seems that such an error could be resulting from insufficient permission to destination branch, however the destination branch in our case was a personal branch with Push, Push Merge Commit, Submit are granted. We are not able to use this new feature since its introduction in Gerrit 2.8. Are there any required permissions for source or destination branches to cherry pick using this new feature ?
Thanks
Bassem