GitCommandResult (@NotNull GitRepository repository, @NotNull String branchName, boolean force, GitLineHandlerListener @NotNull ... 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) { h.addLineListener(listener); } return runCommand(h); }