Record Class FinishOptions

java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.gitflow.FinishOptions
Record Components:
keepBranch - keep the finished branch instead of deleting it
tagMessage - message of the version tag for releases and hotfixes; null for the default
squash - combine all commits of the branch into one commit when merging it (features into the development branch, releases and hotfixes into the production branch). The back-merge of a release or hotfix into development is always a normal merge. A squash merge cannot be resumed: on conflicts nothing is changed (FinishResult.Outcome.CONFLICTS_ROLLED_BACK).
squashMessage - message of the squash commit; null or blank for the default

public record FinishOptions(boolean keepBranch, String tagMessage, boolean squash, String squashMessage) extends Record
  • Constructor Details

    • FinishOptions

      public FinishOptions(boolean keepBranch, String tagMessage)
      Without squashing.
    • FinishOptions

      public FinishOptions(boolean keepBranch, String tagMessage, boolean squash, String squashMessage)
      Creates an instance of a FinishOptions record class.
      Parameters:
      keepBranch - the value for the keepBranch record component
      tagMessage - the value for the tagMessage record component
      squash - the value for the squash record component
      squashMessage - the value for the squashMessage record component
  • Method Details

    • defaults

      public static FinishOptions defaults()
      Delete the branch after the merge, default tag message, no squash.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • keepBranch

      public boolean keepBranch()
      Returns the value of the keepBranch record component.
      Returns:
      the value of the keepBranch record component
    • tagMessage

      public String tagMessage()
      Returns the value of the tagMessage record component.
      Returns:
      the value of the tagMessage record component
    • squash

      public boolean squash()
      Returns the value of the squash record component.
      Returns:
      the value of the squash record component
    • squashMessage

      public String squashMessage()
      Returns the value of the squashMessage record component.
      Returns:
      the value of the squashMessage record component