mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git: get the list of branches from Git under a modal progress instead of the EDT: IDEA-215869
GitOrigin-RevId: 42c271bf6b303b0d9089e8945fa22500a7651df6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d4100b9a7b
commit
0f70237a11
@@ -2,6 +2,7 @@
|
||||
package git4idea.merge;
|
||||
|
||||
import com.intellij.ide.util.ElementsChooser;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
@@ -137,7 +138,9 @@ public class GitMergeDialog extends DialogWrapper {
|
||||
VirtualFile root = getSelectedRoot();
|
||||
GitLineHandler handler = new GitLineHandler(myProject, root, GitCommand.BRANCH);
|
||||
handler.addParameters("--no-color", "-a", "--no-merged");
|
||||
String output = Git.getInstance().runCommand(handler).getOutputOrThrow();
|
||||
String output = ProgressManager.getInstance().runProcessWithProgressSynchronously(
|
||||
() -> Git.getInstance().runCommand(handler).getOutputOrThrow(),
|
||||
"Preparing List of Branches", true, myProject);
|
||||
myBranchChooser.clear();
|
||||
for (StringTokenizer lines = new StringTokenizer(output, "\n", false); lines.hasMoreTokens();) {
|
||||
String branch = lines.nextToken().substring(2);
|
||||
|
||||
Reference in New Issue
Block a user