java.lang.Object | ||
↳ | java.lang.Enum<E extends java.lang.Enum<E>> | |
↳ | com.atlassian.bitbucket.scm.git.command.merge.GitMergeFastForward |
Describes the possible fast-forward settings for git merge
.
Enum Values | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
GitMergeFastForward | DEFAULT | Uses the default fast-forward setting for git merge , which is generally ON . |
|||||||||
GitMergeFastForward | OFF | Always create a merge commit, even if merge target is an ancestor of the commit being merged, meaning the branch pointer could simply be fast-forwarded to the incoming commit without performing a merge. | |||||||||
GitMergeFastForward | ON | Only create a merge commit if the merge target is not an ancestor of the commit being merged, meaning it is not possible to fast-forward the branch pointer. | |||||||||
GitMergeFastForward | ONLY | Fail if a merge commit would be created, only allowing the "merge" to be performed if the merge target is an ancestor of the commit being merged. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Indicates whether this fast-forward setting has a specific
flag for use with
git merge . | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Always create a merge commit, even if merge target is an ancestor of the commit being merged, meaning the branch pointer could simply be fast-forwarded to the incoming commit without performing a merge.
This is the default merge behaviour for normal
merges unless explicitly configured
otherwise.
Only create a merge commit if the merge target is not an ancestor of the commit being merged, meaning it is not possible to fast-forward the branch pointer.
When using this mode with a normal
merge, any commit message or other configuration
applied to the merge command will have no effect if the merge can be accomplished by fast-forwarding the branch
pointer since no commit is created. This mode has no effect on squash
merges, which
always produce a new non-merge commit even if the branch pointer can be fast-forwarded.
Fail if a merge commit would be created, only allowing the "merge" to be performed if the merge target is an ancestor of the commit being merged.
For normal
merges this mode will never create a merge commit. As a result, any
commit message or other configuration applied to the merge command will always be ignored.
For squash
merges this mode will trigger the merge to fail if the source branch is not
fast-forward from the target. However, a new commit will always be created--the branch pointer will never
be fast-forwarded. The new commit will reference the same tree as the source commit (so it will contain
exactly the same changes), but will have its own author and committer details and commit message.