Interface GitMergeBuilder

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

public interface GitMergeBuilder extends GitMergeBuilderSupport<GitMergeBuilder>
A builder which can be used to construct a command for running git merge. In addition to common merge options, this builder provides options for controlling the fast-forwardness of the merge, specifying the commit message and including summary messages in the commit messages to describe the commits which were included in the merge.
See Also:
  • Method Details

    • log

      @Nonnull GitMergeBuilder log(boolean value)
      Sets a flag which, when enabled, causes git merge to include a brief synopsis of the commits included by the merge. The exact output of this flag varies slightly depending on the version of git installed, but in general it will append summary messages for all commits included by the merged commit which are not already present on the target branch.

      When git merge --log is enabled using this method, all commits included in the merge will have their summaries appended. To apply a limit to how many summaries are included, use log(int) instead.

      Note: If a message is supplied, it will become the first part of the commit message for the merge and the --log-produced summaries will be appended after it.

      Parameters:
      value - true to include commit summaries for all merged commits; otherwise, false (the default) to use only the provided message
      Returns:
      this
    • log

      @Nonnull GitMergeBuilder log(int value)
      Sets the number of summary messages to append for commits included in the merge. If the provided value is less than or equal to 0, no summaries will be appended to the merge's commit message. Otherwise, up to the number provided will be included. Included commits begin with the commit specified as the tip of the merge, traversing from there back through history to older commits until the configured number have been appended or included commits have been exhausted. The exact output from this setting varies slightly depending on the version of git installed, but in general it appends summary messages for commits included by the merged commit which are not already present on the target branch.

      Note: If a message is supplied, it will become the first part of the commit message for the merge and the --log-produced summaries will be appended after it.

      Parameters:
      value - the number of commits to include summaries for in the merge's commit message; for 0 or negative values, no summaries will be included
      Returns:
      this
    • message

      @Nonnull GitMergeBuilder message(String value)
      Sets the commit message to be used for the merge.

      Note: If log(int) or log(boolean) is used to enable --log, any message provided here is used as the beginning of the commit message and summaries are appended to it.

      Parameters:
      value - the commit message for the merge
      Returns:
      this