Enum Class RefSyncAction
- All Implemented Interfaces:
Serializable
,Comparable<RefSyncAction>
,Constable
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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSynchronizes the ref by discarding the local changes in favour of the upstream changes.Synchronizes the ref by merging in upstream changes, producing a new merge commit.Synchronizes the ref by rebasing it onto the upstream changes, producing one or more new commits. -
Method Summary
Modifier and TypeMethodDescriptionstatic RefSyncAction
Returns the enum constant of this class with the specified name.static RefSyncAction[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DISCARD
-
MERGE
Synchronizes the ref by merging in upstream changes, producing a new merge commit. This action is only available fordiverged
refs. Refs which areahead
orRejectedRefState.ORPHANED
are already up-to-date with every commit available upstream, meaning there is nothing to merge. Additionally, merge is never available fortags
.Context options:
- "commitMessage" - Defines the commit message for the merge
- See Also:
-
REBASE
Synchronizes the ref by rebasing it onto the upstream changes, producing one or more new commits. This action is only available fordiverged
refs in Git repositories. Refs which areahead
ororphaned
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 fortags
.- Since:
- 5.5
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-