Enum Class RefSyncAction

java.lang.Object
java.lang.Enum<RefSyncAction>
com.atlassian.bitbucket.repository.sync.RefSyncAction
All Implemented Interfaces:
Serializable, Comparable<RefSyncAction>, Constable

public enum RefSyncAction extends Enum<RefSyncAction>
Enumerates possible actions which may be performed to bring an out-of-sync ref back in sync with its upstream. These actions are performed manually when a ref can no longer be automatically synchronized.
See Also:
  • Enum Constant Details

    • DISCARD

      public static final RefSyncAction DISCARD
      Synchronizes the ref by discarding the local changes in favour of the upstream changes.

      The exact behaviour of this action depends on the ref's state:

    • MERGE

      public static final RefSyncAction MERGE
      Synchronizes the ref by merging in upstream changes, producing a new merge commit. This action is only available for diverged refs. Refs which are ahead or RejectedRefState.ORPHANED are already up-to-date with every commit available upstream, meaning there is nothing to merge. Additionally, merge is never available for tags.

      Context options:

      • "commitMessage" - Defines the commit message for the merge
      See Also:
    • REBASE

      public static final RefSyncAction REBASE
      Synchronizes the ref by rebasing it onto the upstream changes, producing one or more new commits. This action is only available for diverged refs in Git repositories. Refs which are ahead or orphaned are already up-to-date with every commit available upstream, meaning a rebase (without --force-rebase would be a no-op. Lastly, rebasing is never available for tags.
      Since:
      5.5
  • Method Details

    • values

      public static RefSyncAction[] 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 RefSyncAction 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