diff options
author | Laurent Delaigue | 2016-01-13 08:46:27 +0000 |
---|---|---|
committer | Matthias Sohn | 2016-01-21 15:08:50 +0000 |
commit | 40e9eb04377630ffb45799a909783b8d088e436b (patch) | |
tree | 0eaadb97befaea0d85cc15d2b970f3a024d32ea6 | |
parent | b7b3fb337c9e9d7b331f1ed8092ebc8fe0b31424 (diff) | |
download | egit-40e9eb04377630ffb45799a909783b8d088e436b.tar.gz egit-40e9eb04377630ffb45799a909783b8d088e436b.tar.xz egit-40e9eb04377630ffb45799a909783b8d088e436b.zip |
Pass a ProgressMonitor to JGit for merges
Change-Id: I0e1556c670c6bba458f175e283205cc33f143c15
Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
-rw-r--r-- | org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java index 23010c93a5..055a509f6f 100644 --- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java +++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java @@ -32,6 +32,7 @@ import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubMonitor; import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.egit.core.Activator; +import org.eclipse.egit.core.EclipseGitProgressTransformer; import org.eclipse.egit.core.internal.CoreText; import org.eclipse.egit.core.internal.job.RuleUtil; import org.eclipse.egit.core.internal.util.ProjectUtil; @@ -158,7 +159,9 @@ public class MergeOperation implements IEGitOperation { CoreText.MergeOperation_ProgressMerge, refName), 3); Git git = new Git(repository); progress.worked(1); - MergeCommand merge = git.merge(); + MergeCommand merge = git.merge() + .setProgressMonitor( + new EclipseGitProgressTransformer(progress.newChild(1))); try { Ref ref = repository.getRef(refName); if (ref != null) @@ -181,7 +184,6 @@ public class MergeOperation implements IEGitOperation { merge.setMessage(message); try { mergeResult = merge.call(); - progress.worked(1); if (MergeResult.MergeStatus.NOT_SUPPORTED.equals(mergeResult.getMergeStatus())) throw new TeamException(new Status(IStatus.INFO, Activator.getPluginId(), mergeResult.toString())); } catch (NoHeadException e) { |