/**
   * Invokes 'git fetch'.
   *
   * @return true if fetch was successful, false in the case of error.
   */
  public GitFetchResult fetch(@NotNull GitRepository repository) {
    // TODO need to have a fair compound result here
    GitFetchResult fetchResult = GitFetchResult.success();
    if (myFetchAll) {
      fetchResult = fetchAll(repository, fetchResult);
    } else {
      return fetchCurrentRemote(repository);
    }

    repository.update();
    return fetchResult;
  }