diff --git a/plugins/git4idea/remote-servers-git/src/com/intellij/remoteServer/util/CloudGitDeploymentRuntime.java b/plugins/git4idea/remote-servers-git/src/com/intellij/remoteServer/util/CloudGitDeploymentRuntime.java index d308ad144d93..f5b55cdf767c 100644 --- a/plugins/git4idea/remote-servers-git/src/com/intellij/remoteServer/util/CloudGitDeploymentRuntime.java +++ b/plugins/git4idea/remote-servers-git/src/com/intellij/remoteServer/util/CloudGitDeploymentRuntime.java @@ -272,6 +272,7 @@ public class CloudGitDeploymentRuntime extends CloudDeploymentRuntime { if (GitUtil.hasLocalChanges(true, getProject(), myContentRoot)) { GitSimpleHandler handler = new GitSimpleHandler(getProject(), myContentRoot, GitCommand.COMMIT); handler.setSilent(false); + handler.setStdoutSuppressed(false); handler.addParameters("-m", "Deploy"); handler.endOptions(); handler.run(); @@ -423,6 +424,7 @@ public class CloudGitDeploymentRuntime extends CloudDeploymentRuntime { public void doClone(File cloneDirParent, String cloneDirName, String gitUrl) throws ServerRuntimeException { final GitLineHandler handler = new GitLineHandler(getProject(), cloneDirParent, GitCommand.CLONE); handler.setSilent(false); + handler.setStdoutSuppressed(false); handler.setUrl(gitUrl); handler.addParameters("--progress"); handler.addParameters(gitUrl); diff --git a/plugins/git4idea/src/git4idea/actions/GitAbstractRebaseResumeAction.java b/plugins/git4idea/src/git4idea/actions/GitAbstractRebaseResumeAction.java index e98e5bdb40b9..ee03ae650793 100644 --- a/plugins/git4idea/src/git4idea/actions/GitAbstractRebaseResumeAction.java +++ b/plugins/git4idea/src/git4idea/actions/GitAbstractRebaseResumeAction.java @@ -65,6 +65,7 @@ public abstract class GitAbstractRebaseResumeAction extends GitRebaseActionBase } } GitLineHandler h = new GitLineHandler(project, root, GitCommand.REBASE); + h.setStdoutSuppressed(false); h.addParameters(getOptionName()); return h; } diff --git a/plugins/git4idea/src/git4idea/actions/GitRebaseAbort.java b/plugins/git4idea/src/git4idea/actions/GitRebaseAbort.java index 785ad3a2e995..5b56884400ab 100644 --- a/plugins/git4idea/src/git4idea/actions/GitRebaseAbort.java +++ b/plugins/git4idea/src/git4idea/actions/GitRebaseAbort.java @@ -72,6 +72,7 @@ public class GitRebaseAbort extends GitRepositoryAction { } affectedRoots.add(root); GitSimpleHandler h = new GitSimpleHandler(project, root, GitCommand.REBASE); + h.setStdoutSuppressed(false); h.addParameters("--abort"); GitHandlerUtil.doSynchronously(h, getActionName(), h.printableCommandLine()); } diff --git a/plugins/git4idea/src/git4idea/checkin/GitCheckinEnvironment.java b/plugins/git4idea/src/git4idea/checkin/GitCheckinEnvironment.java index 013d4cafe836..13b16bc6d3c7 100644 --- a/plugins/git4idea/src/git4idea/checkin/GitCheckinEnvironment.java +++ b/plugins/git4idea/src/git4idea/checkin/GitCheckinEnvironment.java @@ -329,6 +329,7 @@ public class GitCheckinEnvironment implements CheckinEnvironment { // perform merge commit try { GitSimpleHandler handler = new GitSimpleHandler(project, root, GitCommand.COMMIT); + handler.setStdoutSuppressed(false); handler.addParameters("-F", messageFile.getAbsolutePath()); if (author != null) { handler.addParameters("--author=" + author); @@ -474,6 +475,7 @@ public class GitCheckinEnvironment implements CheckinEnvironment { boolean amend = nextCommitAmend; for (List paths : VcsFileUtil.chunkPaths(root, files)) { GitSimpleHandler handler = new GitSimpleHandler(project, root, GitCommand.COMMIT); + handler.setStdoutSuppressed(false); if (amend) { handler.addParameters("--amend"); } diff --git a/plugins/git4idea/src/git4idea/commands/GitHandler.java b/plugins/git4idea/src/git4idea/commands/GitHandler.java index adbb64de75da..e58b64b249f9 100644 --- a/plugins/git4idea/src/git4idea/commands/GitHandler.java +++ b/plugins/git4idea/src/git4idea/commands/GitHandler.java @@ -126,6 +126,7 @@ public abstract class GitHandler { if (command.name().length() > 0) { myCommandLine.addParameter(command.name()); } + myStdoutSuppressed = true; } /** @@ -590,8 +591,10 @@ public abstract class GitHandler { public void setSilent(final boolean silent) { checkNotStarted(); mySilent = silent; - setStderrSuppressed(silent); - setStdoutSuppressed(silent); + if (silent) { + setStderrSuppressed(true); + setStdoutSuppressed(true); + } } /** diff --git a/plugins/git4idea/src/git4idea/commands/GitImpl.java b/plugins/git4idea/src/git4idea/commands/GitImpl.java index 7c58f9c91d23..1fcd7067ddde 100644 --- a/plugins/git4idea/src/git4idea/commands/GitImpl.java +++ b/plugins/git4idea/src/git4idea/commands/GitImpl.java @@ -62,6 +62,7 @@ public class GitImpl implements Git { h.addLineListener(listener); } h.setSilent(false); + h.setStdoutSuppressed(false); return run(h); } @@ -132,6 +133,7 @@ public class GitImpl implements Git { public GitCommandResult clone(@NotNull Project project, @NotNull File parentDirectory, @NotNull String url, @NotNull String clonedDirectoryName, @NotNull GitLineHandlerListener... listeners) { GitLineHandlerPasswordRequestAware handler = new GitLineHandlerPasswordRequestAware(project, parentDirectory, GitCommand.CLONE); + handler.setStdoutSuppressed(false); handler.setUrl(url); handler.addParameters("--progress"); handler.addParameters(url); @@ -231,6 +233,7 @@ public class GitImpl implements Git { @NotNull GitLineHandlerListener... listeners) { final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitCommand.CHECKOUT); h.setSilent(false); + h.setStdoutSuppressed(false); if (force) { h.addParameters("--force"); } @@ -255,6 +258,7 @@ public class GitImpl implements Git { @Nullable GitLineHandlerListener listener) { final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitCommand.CHECKOUT.readLockingCommand()); h.setSilent(false); + h.setStdoutSuppressed(false); h.addParameters("-b"); h.addParameters(branchName); if (listener != null) { @@ -290,6 +294,7 @@ public class GitImpl implements Git { @NotNull GitLineHandlerListener... listeners) { final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitCommand.BRANCH); h.setSilent(false); + h.setStdoutSuppressed(false); h.addParameters(force ? "-D" : "-d"); h.addParameters(branchName); for (GitLineHandlerListener listener : listeners) { @@ -318,6 +323,7 @@ public class GitImpl implements Git { @NotNull public GitCommandResult branchCreate(@NotNull GitRepository repository, @NotNull String branchName) { final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitCommand.BRANCH); + h.setStdoutSuppressed(false); h.addParameters(branchName); return run(h); } @@ -362,6 +368,7 @@ public class GitImpl implements Git { GitCommand.PUSH); h.setUrl(url); h.setSilent(false); + h.setStdoutSuppressed(false); addListeners(h, listeners); h.addProgressParameter(); h.addParameters(remote); @@ -409,6 +416,7 @@ public class GitImpl implements Git { handler.addParameters(hash); addListeners(handler, listeners); handler.setSilent(false); + handler.setStdoutSuppressed(false); return run(handler); } diff --git a/plugins/git4idea/src/git4idea/merge/GitMerger.java b/plugins/git4idea/src/git4idea/merge/GitMerger.java index 4a94c720635a..c5b855765592 100644 --- a/plugins/git4idea/src/git4idea/merge/GitMerger.java +++ b/plugins/git4idea/src/git4idea/merge/GitMerger.java @@ -65,6 +65,7 @@ public class GitMerger { public void mergeCommit(VirtualFile root) throws VcsException { GitSimpleHandler handler = new GitSimpleHandler(myProject, root, GitCommand.COMMIT); + handler.setStdoutSuppressed(false); File gitDir = new File(VfsUtilCore.virtualToIoFile(root), GitUtil.DOT_GIT); File messageFile = new File(gitDir, GitRepositoryFiles.MERGE_MSG); diff --git a/plugins/git4idea/src/git4idea/rebase/GitRebaseDialog.java b/plugins/git4idea/src/git4idea/rebase/GitRebaseDialog.java index 97d58b70681c..04e20c067fd7 100644 --- a/plugins/git4idea/src/git4idea/rebase/GitRebaseDialog.java +++ b/plugins/git4idea/src/git4idea/rebase/GitRebaseDialog.java @@ -163,6 +163,7 @@ public class GitRebaseDialog extends DialogWrapper { public GitLineHandler handler() { GitLineHandler h = new GitLineHandler(myProject, gitRoot(), GitCommand.REBASE); + h.setStdoutSuppressed(false); if (myInteractiveCheckBox.isSelected() && myInteractiveCheckBox.isEnabled()) { h.addParameters("-i"); } diff --git a/plugins/git4idea/src/git4idea/rebase/GitRebaser.java b/plugins/git4idea/src/git4idea/rebase/GitRebaser.java index 65883e848bd0..e0421b7bf67e 100644 --- a/plugins/git4idea/src/git4idea/rebase/GitRebaser.java +++ b/plugins/git4idea/src/git4idea/rebase/GitRebaser.java @@ -72,6 +72,7 @@ public class GitRebaser { @Nullable final Runnable onCancel, @Nullable GitLineHandlerListener lineListener) { final GitLineHandler rebaseHandler = createHandler(root); + rebaseHandler.setStdoutSuppressed(false); rebaseHandler.addParameters(parameters); if (lineListener != null) { rebaseHandler.addLineListener(lineListener); @@ -141,6 +142,7 @@ public class GitRebaser { public void abortRebase(@NotNull VirtualFile root) { LOG.info("abortRebase " + root); final GitLineHandler rh = new GitLineHandler(myProject, root, GitCommand.REBASE); + rh.setStdoutSuppressed(false); rh.addParameters("--abort"); GitTask task = new GitTask(myProject, rh, "Aborting rebase"); task.setProgressIndicator(myProgressIndicator); @@ -167,6 +169,7 @@ public class GitRebaser { private boolean continueRebase(final @NotNull VirtualFile root, @NotNull String startOperation) { LOG.info("continueRebase " + root + " " + startOperation); final GitLineHandler rh = new GitLineHandler(myProject, root, GitCommand.REBASE); + rh.setStdoutSuppressed(false); rh.addParameters(startOperation); final GitRebaseProblemDetector rebaseConflictDetector = new GitRebaseProblemDetector(); rh.addLineListener(rebaseConflictDetector); @@ -215,6 +218,7 @@ public class GitRebaser { } final GitLineHandler h = new GitLineHandler(myProject, root, GitCommand.REBASE); + h.setStdoutSuppressed(false); Integer rebaseEditorNo = null; GitRebaseEditorService rebaseEditorService = GitRebaseEditorService.getInstance(); try { diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java index 4faaf7bf568f..4007086bb485 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java @@ -250,6 +250,7 @@ public class GithubRebaseAction extends DumbAwareAction { final GitRebaser rebaser = new GitRebaser(project, ServiceManager.getService(Git.class), indicator); final GitLineHandler handler = new GitLineHandler(project, root, GitCommand.REBASE); + handler.setStdoutSuppressed(false); handler.addParameters("upstream/master"); final GitRebaseProblemDetector rebaseConflictDetector = new GitRebaseProblemDetector(); diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java index 99c5ff9020c6..dddd145bd92b 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java @@ -265,6 +265,7 @@ public class GithubShareAction extends DumbAwareAction { @NotNull VirtualFile root, @NotNull ProgressIndicator indicator) { final GitLineHandler h = new GitLineHandler(project, root, GitCommand.INIT); + h.setStdoutSuppressed(false); GitHandlerUtil.runInCurrentThread(h, indicator, true, GitBundle.getString("initializing.title")); if (!h.errors().isEmpty()) { GitUIUtil.showOperationErrors(project, h.errors(), "git init"); @@ -333,6 +334,7 @@ public class GithubShareAction extends DumbAwareAction { LOG.info("Performing commit"); indicator.setText("Performing commit..."); GitSimpleHandler handler = new GitSimpleHandler(project, root, GitCommand.COMMIT); + handler.setStdoutSuppressed(false); handler.addParameters("-m", dialog.getCommitMessage()); handler.endOptions(); handler.run();