List of usage examples for org.eclipse.jgit.lib Repository readCherryPickHead
@Nullable public ObjectId readCherryPickHead() throws IOException, NoWorkTreeException
From source file:org.eclipse.egit.ui.internal.commit.CommitHelper.java
License:Open Source License
private static String getCherryPickOriginalAuthor(Repository mergeRepository) { try {//from w w w .ja va2s . co m ObjectId cherryPickHead = mergeRepository.readCherryPickHead(); PersonIdent author = new RevWalk(mergeRepository).parseCommit(cherryPickHead).getAuthorIdent(); return author.getName() + " <" + author.getEmailAddress() + ">"; //$NON-NLS-1$//$NON-NLS-2$ } catch (IOException e) { Activator.handleError(UIText.CommitAction_errorRetrievingCommit, e, true); throw new IllegalStateException(e); } }
From source file:org.flowerplatform.web.git.operation.CommitOperation.java
License:Open Source License
private String getCherryPickOriginalAuthor(Repository mergeRepository) { try {/*from w w w. j a v a 2 s . co m*/ ObjectId cherryPickHead = mergeRepository.readCherryPickHead(); PersonIdent author = new RevWalk(mergeRepository).parseCommit(cherryPickHead).getAuthorIdent(); return author.getName() + " <" + author.getEmailAddress() + ">"; } catch (IOException e) { return null; } }