GitCommandResult (final @NotNull GitRepository repository, final @NotNull GitRemote remote) { return runCommand(() -> { GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitCommand.REMOTE.writeLockingCommand()); h.setStdoutSuppressed(false); h.addParameters("prune"); h.addParameters(remote.getName()); h.setUrls(remote.getUrls()); return h; }); }