public enum GitMergeFastForward extends Enum<GitMergeFastForward>
git merge
.Enum Constant and Description |
---|
DEFAULT
Uses the default fast-forward setting for
git merge , which is generally ON . |
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.
|
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.
|
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.
|
Modifier and Type | Method and Description |
---|---|
String |
getFlag() |
boolean |
isFlagged()
Indicates whether this fast-forward setting has a specific
flag for use with
git merge . |
static GitMergeFastForward |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GitMergeFastForward[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GitMergeFastForward DEFAULT
public static final GitMergeFastForward OFF
This is the default merge behaviour for normal
merges unless explicitly configured
otherwise.
public static final GitMergeFastForward ON
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.
public static final GitMergeFastForward ONLY
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.
public static GitMergeFastForward[] values()
for (GitMergeFastForward c : GitMergeFastForward.values()) System.out.println(c);
public static GitMergeFastForward valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2019 Atlassian. All rights reserved.