Enum Class MergeMode

java.lang.Object
java.lang.Enum<MergeMode>
io.github.jbastgen.stemma.git.api.MergeMode
All Implemented Interfaces:
Serializable, Comparable<MergeMode>, Constable

public enum MergeMode extends Enum<MergeMode>
How a merge is performed.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Fast-forward when possible, otherwise create a merge commit.
    Always create a merge commit, even if a fast-forward would be possible (Git Flow).
    Combine all changes of the other branch into one new commit on the current branch, which does not get the other branch as a parent (so the other branch is not "merged" in git's eyes and has to be deleted with force).
  • Method Summary

    Modifier and Type
    Method
    Description
    static MergeMode
    Returns the enum constant of this class with the specified name.
    static MergeMode[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • DEFAULT

      public static final MergeMode DEFAULT
      Fast-forward when possible, otherwise create a merge commit.
    • NO_FAST_FORWARD

      public static final MergeMode NO_FAST_FORWARD
      Always create a merge commit, even if a fast-forward would be possible (Git Flow).
    • SQUASH

      public static final MergeMode SQUASH
      Combine all changes of the other branch into one new commit on the current branch, which does not get the other branch as a parent (so the other branch is not "merged" in git's eyes and has to be deleted with force). Needs a clean working tree. On conflicts nothing is changed: the merge is rolled back and reported as MergeResult.Status.CONFLICTING without leaving a merge in progress, because git cannot resume a squash merge.
  • Method Details

    • values

      public static MergeMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MergeMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null