public static @NotNull String runBundledCommand(@Nullable Project project, String... args) throws VcsException {
    if (project != null && !TrustedProjects.isTrusted(project)) {
      throw new IllegalStateException("Shouldn't be possible to run a Git command in the safe mode");
    }

    try {
      GitExecutable gitExecutable = GitExecutableManager.getInstance().getExecutable(project);
      GeneralCommandLine command = gitExecutable.createBundledCommandLine(project, args);
      command.setCharset(StandardCharsets.UTF_8);

      StringBuilder output = new StringBuilder();
      OSProcessHandler handler = new OSProcessHandler(command);
      handler.addProcessListener(new ProcessAdapter() {
        @Override
        public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
          if (outputType == ProcessOutputTypes.STDOUT) {
            output.append(event.getText());
          }
        }
      });
      handler.startNotify();
      handler.waitFor();
      return output.toString();
    }
    catch (ExecutionException e) {
      throw new VcsException(e);
    }
  }
public static @NotNull String runBundledCommand(@Nullable Project project, String... args)