Top Description Inners Fields Constructors Methods
org.eclipse.jgit.transport

public Class PushConfig

extends Object
Class Inheritance
Imports
java.util.Locale, org.eclipse.jgit.lib.Config, .ConfigConstants, org.eclipse.jgit.util.StringUtils

Push section of a Git configuration file.
Since
4.9

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
PushConfig.PushDefault

Git config values for push.default.

public static enum
PushConfig.PushRecurseSubmodulesMode

Git config values for push.recurseSubmodules.

Field Summary

Modifier and TypeField and Description
private final PushConfig.PushDefault
private final PushConfig.PushRecurseSubmodulesMode

Constructor Summary

AccessConstructor and Description
public
PushConfig(Config
Config to fill the PushConfig from
config
)

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public PushConfig.PushDefault

Returns:

the value
getPushDefault
()

Retrieves the value of git config push.default.

public PushConfig.PushRecurseSubmodulesMode

Returns:

the value
getRecurseSubmodules
()

Retrieves the value of git config push.recurseSubmodules.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

pushDefaultback to summary
private final PushConfig.PushDefault pushDefault
recurseSubmodulesback to summary
private final PushConfig.PushRecurseSubmodulesMode recurseSubmodules

Constructor Detail

PushConfigback to summary
public PushConfig(Config config)

Creates a new instance.

Parameters
config:Config

Config to fill the PushConfig from

Since
6.1

Method Detail

getPushDefaultback to summary
public PushConfig.PushDefault getPushDefault()

Retrieves the value of git config push.default.

Returns:PushConfig.PushDefault

the value

Since
6.1
getRecurseSubmodulesback to summary
public PushConfig.PushRecurseSubmodulesMode getRecurseSubmodules()

Retrieves the value of git config push.recurseSubmodules.

Returns:PushConfig.PushRecurseSubmodulesMode

the value

Since
6.1
org.eclipse.jgit.transport back to summary

public final Enum PushConfig.PushDefault

extends Enum<PushConfig.PushDefault>
implements ConfigEnum
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.lib.Config.ConfigEnum

Git config values for push.default.
Since
6.1

Field Summary

Modifier and TypeField and Description
private final String
public static final PushConfig.PushDefault
CURRENT

Push the current branch to an upstream branch of the same name.

public static final PushConfig.PushDefault
MATCHING

Push all current local branches that match a configured push refspec of the remote configuration.

public static final PushConfig.PushDefault
NOTHING

Do not push if there are no explicit refspecs.

public static final PushConfig.PushDefault
SIMPLE

Like UPSTREAM, but only if the upstream name is the same as the name of the current local branch.

public static final PushConfig.PushDefault
UPSTREAM

Push the current branch to an upstream branch determined by git config branch.

Constructor Summary

AccessConstructor and Description
private
private

Method Summary

Modifier and TypeMethod and Description
public boolean
matchConfigValue(String
the string to match
in
)

Implements org.eclipse.jgit.lib.Config.ConfigEnum.matchConfigValue.

Checks if the given string matches with enum value.

public String
toConfigValue()

Implements org.eclipse.jgit.lib.Config.ConfigEnum.toConfigValue.

Converts enumeration value into a string to be save in config.

public static PushConfig.PushDefault
public static PushConfig.PushDefault[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

aliasback to summary
private final String alias
CURRENTback to summary
public static final PushConfig.PushDefault CURRENT

Push the current branch to an upstream branch of the same name.

MATCHINGback to summary
public static final PushConfig.PushDefault MATCHING

Push all current local branches that match a configured push refspec of the remote configuration.

NOTHINGback to summary
public static final PushConfig.PushDefault NOTHING

Do not push if there are no explicit refspecs.

SIMPLEback to summary
public static final PushConfig.PushDefault SIMPLE

Like UPSTREAM, but only if the upstream name is the same as the name of the current local branch.

UPSTREAMback to summary
public static final PushConfig.PushDefault UPSTREAM

Push the current branch to an upstream branch determined by git config branch.<currentBranch>.merge.

Constructor Detail

PushDefaultback to summary
private PushDefault()
PushDefaultback to summary
private PushDefault(String alias)

Method Detail

matchConfigValueback to summary
public boolean matchConfigValue(String in)

Implements org.eclipse.jgit.lib.Config.ConfigEnum.matchConfigValue.

Doc from org.eclipse.jgit.lib.Config.ConfigEnum.matchConfigValue.

Checks if the given string matches with enum value.

Parameters
in:String

the string to match

Returns:boolean

true if the given string matches enum value, false otherwise

Annotations
@Override
toConfigValueback to summary
public String toConfigValue()

Implements org.eclipse.jgit.lib.Config.ConfigEnum.toConfigValue.

Doc from org.eclipse.jgit.lib.Config.ConfigEnum.toConfigValue.

Converts enumeration value into a string to be save in config.

Returns:String

the enum value as config string

Annotations
@Override
valueOfback to summary
public static PushConfig.PushDefault valueOf(String name)
valuesback to summary
public static PushConfig.PushDefault[] values()
org.eclipse.jgit.transport back to summary

public final Enum PushConfig.PushRecurseSubmodulesMode

extends Enum<PushConfig.PushRecurseSubmodulesMode>
implements ConfigEnum
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.lib.Config.ConfigEnum

Git config values for push.recurseSubmodules.

Field Summary

Modifier and TypeField and Description
public static final PushConfig.PushRecurseSubmodulesMode
CHECK

Verify that all submodule commits that changed in the revisions to be pushed are available on at least one remote of the submodule.

private final String
public static final PushConfig.PushRecurseSubmodulesMode
NO

Default behavior of ignoring submodules when pushing is retained.

public static final PushConfig.PushRecurseSubmodulesMode
ON_DEMAND

All submodules that changed in the revisions to be pushed will be pushed.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
matchConfigValue(String
the string to match
s
)

Implements org.eclipse.jgit.lib.Config.ConfigEnum.matchConfigValue.

Checks if the given string matches with enum value.

public String
toConfigValue()

Implements org.eclipse.jgit.lib.Config.ConfigEnum.toConfigValue.

Converts enumeration value into a string to be save in config.

public static PushConfig.PushRecurseSubmodulesMode
public static PushConfig.PushRecurseSubmodulesMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CHECKback to summary
public static final PushConfig.PushRecurseSubmodulesMode CHECK

Verify that all submodule commits that changed in the revisions to be pushed are available on at least one remote of the submodule.

configValueback to summary
private final String configValue
NOback to summary
public static final PushConfig.PushRecurseSubmodulesMode NO

Default behavior of ignoring submodules when pushing is retained.

ON_DEMANDback to summary
public static final PushConfig.PushRecurseSubmodulesMode ON_DEMAND

All submodules that changed in the revisions to be pushed will be pushed.

Constructor Detail

PushRecurseSubmodulesModeback to summary
private PushRecurseSubmodulesMode(String configValue)

Method Detail

matchConfigValueback to summary
public boolean matchConfigValue(String s)

Implements org.eclipse.jgit.lib.Config.ConfigEnum.matchConfigValue.

Doc from org.eclipse.jgit.lib.Config.ConfigEnum.matchConfigValue.

Checks if the given string matches with enum value.

Parameters
s:String

the string to match

Returns:boolean

true if the given string matches enum value, false otherwise

Annotations
@Override
toConfigValueback to summary
public String toConfigValue()

Implements org.eclipse.jgit.lib.Config.ConfigEnum.toConfigValue.

Doc from org.eclipse.jgit.lib.Config.ConfigEnum.toConfigValue.

Converts enumeration value into a string to be save in config.

Returns:String

the enum value as config string

Annotations
@Override
valueOfback to summary
public static PushConfig.PushRecurseSubmodulesMode valueOf(String name)
valuesback to summary
public static PushConfig.PushRecurseSubmodulesMode[] values()