createFile(rebaseDir, AUTHOR_SCRIPT, authorScript);
createFile(rebaseDir, MESSAGE, commitToPick.getFullMessage());
ByteArrayOutputStream bos = new ByteArrayOutputStream();
DiffFormatter df = new DiffFormatter(bos);
df.setRepository(repo);
df.format(commitToPick.getParent(0), commitToPick);
createFile(rebaseDir, PATCH, new String(bos.toByteArray(),
Constants.CHARACTER_ENCODING));
createFile(rebaseDir, STOPPED_SHA, repo.newObjectReader().abbreviate(
commitToPick).name());
// Remove cherry pick state file created by CherryPickCommand, it's not