JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported);
RevCommit headCommit = revWalk.parseCommit(headRef.getObjectId());
+ newHead = headCommit;
+
// loop through all refs to be cherry-picked
for (Ref src : commits) {
// get the commit to be cherry-picked
merger.setBase(srcParent.getTree());
if (merger.merge(headCommit, srcCommit)) {
+ if (AnyObjectId.equals(headCommit.getTree().getId(), merger
+ .getResultTreeId()))
+ continue;
DirCacheCheckout dco = new DirCacheCheckout(repo,
headCommit.getTree(), repo.lockDirCache(),
merger.getResultTreeId());
JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported);
RevCommit headCommit = revWalk.parseCommit(headRef.getObjectId());
+ newHead = headCommit;
+
// loop through all refs to be reverted
for (Ref src : commits) {
// get the commit to be reverted
merger.setBase(srcCommit.getTree());
if (merger.merge(headCommit, srcParent)) {
+ if (AnyObjectId.equals(headCommit.getTree().getId(), merger
+ .getResultTreeId()))
+ continue;
DirCacheCheckout dco = new DirCacheCheckout(repo,
headCommit.getTree(), repo.lockDirCache(),
merger.getResultTreeId());