Interface GitMergeBuilder
- All Superinterfaces:
com.atlassian.bitbucket.scm.CommandBuilderSupport<GitMergeBuilder>
,GitCommandBuilderSupport<GitMergeBuilder>
,GitMergeBuilderSupport<GitMergeBuilder>
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:
-
Field Summary
Fields inherited from interface com.atlassian.bitbucket.scm.git.command.GitCommandBuilderSupport
ENV_AUTHOR_DATE, ENV_AUTHOR_EMAIL, ENV_AUTHOR_NAME, ENV_COMMITTER_DATE, ENV_COMMITTER_EMAIL, ENV_COMMITTER_NAME
-
Method Summary
Modifier and TypeMethodDescriptionlog
(boolean value) Sets a flag which, when enabled, causesgit merge
to include a brief synopsis of the commits included by the merge.log
(int value) Sets the number of summary messages to append for commits included in the merge.Sets the commit message to be used for the merge.Methods inherited from interface com.atlassian.bitbucket.scm.CommandBuilderSupport
clearEnvironment, defaultExitHandler, exitHandler, removeEnvironment, withEnvironment
Methods inherited from interface com.atlassian.bitbucket.scm.git.command.GitCommandBuilderSupport
alternate, alternates, alternates, author, author, author, build, commitish, committer, committer, committer, treeish, withConfiguration, withConfiguration, withConfiguration, withConfiguration
Methods inherited from interface com.atlassian.bitbucket.scm.git.command.merge.GitMergeBuilderSupport
allowUnrelatedHistories, build, commit, errorHandler, ff, quiet, verify
-
Method Details
-
log
Sets a flag which, when enabled, causesgit 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, uselog(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 providedmessage
- Returns:
this
-
log
Sets the number of summary messages to append for commits included in the merge. If the provided value is less than or equal to0
, no summaries will be appended to the merge's commit message. Otherwise, up to the number provided will be included. Included commits begin with thecommit
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; for0
or negative values, no summaries will be included- Returns:
this
-
message
Sets the commit message to be used for the merge.Note: If
log(int)
orlog(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
-