From 3ad454497cdb6a917c00b01c735f5a469b8fb2ff Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Thu, 21 Feb 2013 00:07:33 +0100 Subject: Do not cherry-pick merge commits during rebase Rebase computes the list of commits that are included in the merges, just like Git does, so do not try to include the merge commits. Re-recreating merges during rebase is a bit more complicated and might be a useful future extension, but for now just linearize during rebase. Change-Id: I61239d265f395e5ead580df2528e46393dc6bdbd Signed-off-by: Robin Stocker --- org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api') diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java index 5158c8533b..a100c9d878 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java @@ -640,11 +640,7 @@ public class RebaseCommand extends GitCommand { List cherryPickList = new ArrayList(); for (RevCommit commit : commitsToUse) { if (commit.getParentCount() != 1) - throw new JGitInternalException( - MessageFormat.format( - JGitText.get().canOnlyCherryPickCommitsWithOneParent, - commit.name(), - Integer.valueOf(commit.getParentCount()))); + continue; cherryPickList.add(commit); } -- cgit v1.2.3