Package org.eclipse.jgit.transport
Enum Class PushConfig.PushDefault
- All Implemented Interfaces:
Serializable
,Comparable<PushConfig.PushDefault>
,Constable
,Config.ConfigEnum
- Enclosing class:
- PushConfig
public static enum PushConfig.PushDefault
extends Enum<PushConfig.PushDefault>
implements Config.ConfigEnum
Git config values for
push.default
.- Since:
- 6.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPush the current branch to an upstream branch of the same name.Push all current local branches that match a configured push refspec of the remote configuration.Do not push if there are no explicit refspecs.LikeUPSTREAM
, but only if the upstream name is the same as the name of the current local branch.Push the current branch to an upstream branch determined by git configbranch.<currentBranch>.merge
. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the given string matches with enum value.Converts enumeration value into a string to be save in config.static PushConfig.PushDefault
Returns the enum constant of this class with the specified name.static PushConfig.PushDefault[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOTHING
Do not push if there are no explicit refspecs. -
CURRENT
Push the current branch to an upstream branch of the same name. -
UPSTREAM
Push the current branch to an upstream branch determined by git configbranch.<currentBranch>.merge
. -
SIMPLE
LikeUPSTREAM
, but only if the upstream name is the same as the name of the current local branch. -
MATCHING
Push all current local branches that match a configured push refspec of the remote configuration.
-
-
Field Details
-
alias
-
-
Constructor Details
-
PushDefault
private PushDefault() -
PushDefault
-
-
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
-
toConfigValue
Description copied from interface:Config.ConfigEnum
Converts enumeration value into a string to be save in config.- Specified by:
toConfigValue
in interfaceConfig.ConfigEnum
- Returns:
- the enum value as config string
-
matchConfigValue
Description copied from interface:Config.ConfigEnum
Checks if the given string matches with enum value.- Specified by:
matchConfigValue
in interfaceConfig.ConfigEnum
- Parameters:
in
- the string to match- Returns:
- true if the given string matches enum value, false otherwise
-