public interface

GitSquashMergeBuilder

implements GitMergeBuilderSupport<B extends GitMergeBuilderSupport<B>>
com.atlassian.bitbucket.scm.git.command.merge.GitSquashMergeBuilder

Class Overview

A builder which can be used to construct a command for running git merge --squash. This builder only supports the common merge options.

See Also

Summary

[Expand]
Inherited Constants
From interface com.atlassian.bitbucket.scm.git.command.GitCommandBuilderSupport
Public Methods
@Nonnull GitSquashMergeBuilder ff(GitMergeFastForward value)
Sets the fast-forward mode to use when executing git merge.
[Expand]
Inherited Methods
From interface com.atlassian.bitbucket.scm.CommandBuilderSupport
From interface com.atlassian.bitbucket.scm.git.command.GitCommandBuilderSupport
From interface com.atlassian.bitbucket.scm.git.command.merge.GitMergeBuilderSupport

Public Methods

@Nonnull public GitSquashMergeBuilder ff (GitMergeFastForward value)

Sets the fast-forward mode to use when executing git merge. The modes available are documented on the enumeration and have different behaviour when applied to --squash merges:

  • --no-ff and --ff are both ignored
    • --ff is accepted by git merge --squash but does not change its behaviour
    • --no-ff causes git merge --squash to fail but mimics the behaviour of a squash merge, which always produces a new commit, and so it is ignored by this builder
  • --ff-only when paired with --squash still creates a new commit, but will fail if the source branch is not fast-forward from the target rather than actually performing any merging

Parameters
value the fast-forward mode to apply when performing the merge; only --ff-only has distinct behaviour
Returns
  • this