Interface GitMergeBuilderSupport<B extends GitMergeBuilderSupport<B>>

All Superinterfaces:
com.atlassian.bitbucket.scm.CommandBuilderSupport<B>, GitCommandBuilderSupport<B>
All Known Subinterfaces:
GitMergeBuilder, GitSquashMergeBuilder

public interface GitMergeBuilderSupport<B extends GitMergeBuilderSupport<B>> extends GitCommandBuilderSupport<B>
A base class for constructing builders around git merge, supplying properties which are common to all usages of the command.
  • Method Details

    • allowUnrelatedHistories

      @Nonnull B allowUnrelatedHistories(boolean value)
      Controls whether git merge will allow merging two commits that have no common ancestor. In Git 2.9 the default (in the Git SCM itself) shifted from true to false. All modern versions of Git require this flag to be explicitly set to allow merging unrelated commits.
      Parameters:
      value - true to allow merging unrelated commits; otherwise, false to require commits to share a common ancestor in order to merge them
      Returns:
      this
      Since:
      7.2
    • build

      @Nonnull GitCommand<Void> build()
      Builds a command which will run the configured merge, discarding any output. If the output contains error messages, they will be ignored.
      Returns:
      a command to execute the configured merge
    • commit

      @Nonnull B commit(String value)
      Specifies the commit to be merged into the HEAD revision of the repository against which the command is executed.
      Parameters:
      value - the commit to merge, which may be a short or qualified branch or tag name, or a short or full commit hash
      Returns:
      this
    • errorHandler

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

      git merge outputs the warnings to stderr, not stdout, so in order to parse these warnings callers must register an error handler, not an output handler. Initially added to handle warnings that describe merge conflicts of binary files.

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

      @Nonnull B ff(GitMergeFastForward value)
      Sets the fast-forward mode to use when executing git merge. The modes available are documented on the enumeration.
      Parameters:
      value - the fast-forward mode to apply when performing the merge
      Returns:
      this
    • quiet

      @Nonnull B quiet(boolean value)
      Sets a flag which controls the output produced by git merge.
      Parameters:
      value - true to reduce or eliminate output; otherwise, false (the default) to produce normal output
      Returns:
      this
    • verify

      @Nonnull B verify(@Nonnull GitMergeVerify value)
      Controls whether git merge will try to run hooks like commit-msg and pre-merge-commit.
      Parameters:
      value - the verification mode to use
      Returns:
      this
      Since:
      7.2