public byte @NotNull [] run() throws VcsException {
    Project project = project();
    GitVcsConsoleWriter vcsConsoleWriter = project != null
                                           ? GitVcsConsoleWriter.getInstance(project)
                                           : null;

    addListener(new GitHandlerListener() {
      @Override
      public void processTerminated(int exitCode) {
        if (exitCode != 0) {
          Charset cs = getCharset();
          String message = new String(myStderr.toByteArray(), cs);
          if (message.isEmpty()) {
            if (myException.get() != null) {
              message = IdeCoreBundle.message("finished.with.exit.code.text.message", exitCode);
            }
            else {
              message = null;
            }
          }
          else {
            if (vcsConsoleWriter != null && !isStderrSuppressed()) {
              vcsConsoleWriter.showErrorMessage(message);
            }
          }
          if (message != null) {
            VcsException e = myException.getAndSet(new VcsException(message));
            if (e != null) {
              LOG.warn("Dropping previous exception: ", e);
            }
          }
        }
      }

      @Override
      public void startFailed(@NotNull Throwable exception) {
        VcsException err = new VcsException(GitBundle.message("git.executable.unknown.error.message", exception.getMessage()), exception);
        VcsException oldErr = myException.getAndSet(err);
        if (oldErr != null) {
          LOG.warn("Dropping previous exception: ", oldErr);
        }
      }
    });
    if (vcsConsoleWriter != null && !mySilent) {
      vcsConsoleWriter.showCommandLine("[" + GitImpl.stringifyWorkingDir(project.getBasePath(), getWorkingDirectory()) + "] "
                                       + printableCommandLine());
    }
    try {
      runInCurrentThread();
    }
    catch (IOException e) {
      throw new VcsException(e.getMessage(), e);
    }
    if (myException.get() != null) {
      throw myException.get();
    }
    return myStdout.toByteArray();
  }
public byte @NotNull [] run()