Interface GitFetchBuilder

All Superinterfaces:
com.atlassian.bitbucket.scm.CommandBuilderSupport<GitFetchBuilder>, GitCommandBuilderSupport<GitFetchBuilder>

public interface GitFetchBuilder extends GitCommandBuilderSupport<GitFetchBuilder>
A builder which can be used to construct a command for running git fetch.
  • Method Details

    • atomic

      @Nonnull GitFetchBuilder atomic(boolean value)
      Specifies whether the fetch should update the refs atomically (i.e. all or nothing).
      Returns:
      this
      Since:
      8.0
    • clearRefspecs

      @Nonnull GitFetchBuilder clearRefspecs()
      Clears any refspecs which have been added, allowing the same builder to be reused when constructing multiple fetches for different refs.
      Returns:
      this
    • errorHandler

      @Nonnull GitFetchBuilder errorHandler(@Nonnull com.atlassian.bitbucket.scm.CommandErrorHandler value)
      Registers the provided error handler to receive stderr output when the built command is run.

      git fetch outputs the refs that are updated to stderr, not stdout, so in order to parse the refs that change callers must register an error handler, not an output handler.

      Parameters:
      value - the handler to receive stderr output
      Returns:
      this
    • force

      @Nonnull GitFetchBuilder force(boolean value)
    • progress

      @Nonnull GitFetchBuilder progress(boolean value)
    • prune

      @Nonnull GitFetchBuilder prune(boolean value)
      Specifies whether to supply --prune to prune local branches and tags where the upstream branch or tag has been deleted.
      Parameters:
      value - true if local refs which do not exist upstream should be pruned; otherwise false to leave such refs in place
      Returns:
      this
      Since:
      4.1
    • quiet

      @Nonnull GitFetchBuilder quiet(boolean value)
    • refspec

      @Nonnull GitFetchBuilder refspec(String value)
    • refspecs

      @Nonnull GitFetchBuilder refspecs(Iterable<String> values)
    • refspecs

      @Nonnull GitFetchBuilder refspecs(String value, String... values)
    • repository

      @Nonnull GitFetchBuilder repository(com.atlassian.bitbucket.repository.Repository value)
      Specifies which upstream repository to fetch from.
      Parameters:
      value - the repository to fetch from
      Returns:
      this
      Since:
      5.12
    • repository

      @Nonnull GitFetchBuilder repository(String value)
    • tags

      @Nonnull GitFetchBuilder tags(@Nonnull GitFetchTagMode value)
      Specifies --tags or --no-tags, to control whether git fetch fetches tags, and which tags it fetches.
      Parameters:
      value - the tag mode for the command
      Returns:
      this