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

public Class TransferConfig

extends Object
Class Inheritance
Static Imports
org.eclipse.jgit.util.StringUtils.equalsIgnoreCase, .StringUtils.toLowerCase

The standard "transfer", "fetch", "protocol", "receive", and "uploadpack" configuration parameters.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
public static enum
TransferConfig.FsckMode

A git configuration value for how to handle a fsck failure of a particular kind.

public static enum
TransferConfig.ProtocolVersion

A git configuration variable for which versions of the Git protocol to prefer.

Field Summary

Modifier and TypeField and Description
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private static final String
private final String
pack-priv final String[]
private final EnumSet<ObjectChecker.ErrorType>
public static final Config.SectionParser<TransferConfig>
pack-priv final TransferConfig.ProtocolVersion
private final boolean
private final boolean
private final boolean

Constructor Summary

AccessConstructor and Description
public
TransferConfig(Repository
the repository to read settings from. The repository is not retained by the new configuration, instead its settings are copied during the constructor.
db
)

Create a configuration honoring the repository's settings.

public
TransferConfig(Config
the source to read settings from. The source is not retained by the new configuration, instead its settings are copied during the constructor.
rc
)

Create a configuration honoring settings in a org.eclipse.jgit.lib.Config.

Method Summary

Modifier and TypeMethod and Description
public RefFilter

Returns:

org.eclipse.jgit.transport.RefFilter respecting configured hidden refs.
getRefFilter
()

Get org.eclipse.jgit.transport.RefFilter respecting configured hidden refs.

pack-priv boolean

Returns:

true if no ref filtering is needed because there are no configured hidden refs.
hasDefaultRefFilter
()

Like getRefFilter() == RefFilter.DEFAULT, but faster.

public boolean

Returns:

true to advertise object-info to all clients
isAdvertiseObjectInfo
()

Whether to advertise object-info to all clients

public boolean

Returns:

true to advertise sideband all to the clients
isAdvertiseSidebandAll
()

Whether to advertise sideband all to the clients

public boolean

Returns:

true to advertise wait-for-done all to the clients
isAdvertiseWaitForDone
()

Whether to advertise wait-for-done all to the clients

public boolean

Returns:

allow clients to request any SHA-1s?
isAllowAnySha1InWant
()

Whether to allow clients to request any SHA-1s

public boolean

Returns:

true if clients are allowed to specify a "filter" line
isAllowFilter
()

Whether clients are allowed to specify "filter" line

public boolean

Returns:

allow clients to request non-tip SHA-1s?
isAllowReachableSha1InWant
()

Whether to allow clients to request non-tip SHA-1s

public boolean

Returns:

true to advertise and receive session-id capability
isAllowReceiveClientSID
()

Whether to advertise and receive session-id capability

public boolean

Returns:

true if clients are allowed to specify a "want-ref" line
isAllowRefInWant
()

Whether clients are allowed to specify "want-ref" line

public boolean

Returns:

true if the server accepts sideband-all requests (see {isAdvertiseSidebandAll() for the advertisement)
isAllowSidebandAll
()

Whether the server accepts sideband-all requests

public boolean

Returns:

allow clients to request non-advertised tip SHA-1s?
isAllowTipSha1InWant
()

Whether to allow clients to request non-advertised tip SHA-1s

public ObjectChecker

Returns:

checker to verify fetched objects, or null if checking is not enabled in the repository configuration.
newObjectChecker
()

Create checker to verify fetched objects

private ObjectChecker
newObjectChecker(boolean check)

public ObjectChecker

Returns:

checker to verify objects pushed into this repository, or null if checking is not enabled in the repository configuration.
newReceiveObjectChecker
()

Create checker to verify objects pushed into this repository

private ObjectIdSet
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

advertiseObjectInfoback to summary
private final boolean advertiseObjectInfo
advertiseSidebandAllback to summary
private final boolean advertiseSidebandAll
advertiseWaitForDoneback to summary
private final boolean advertiseWaitForDone
allowAnySha1InWantback to summary
private final boolean allowAnySha1InWant
allowFilterback to summary
private final boolean allowFilter
allowInvalidPersonIdentback to summary
private final boolean allowInvalidPersonIdent
allowReachableSha1InWantback to summary
private final boolean allowReachableSha1InWant
allowReceiveClientSIDback to summary
private final boolean allowReceiveClientSID
allowRefInWantback to summary
private final boolean allowRefInWant
allowSidebandAllback to summary
private final boolean allowSidebandAll
allowTipSha1InWantback to summary
private final boolean allowTipSha1InWant
fetchFsckback to summary
private final boolean fetchFsck
FSCKback to summary
private static final String FSCK
fsckSkipListback to summary
private final String fsckSkipList
hideRefsback to summary
pack-priv final String[] hideRefs
ignoreback to summary
private final EnumSet<ObjectChecker.ErrorType> ignore
KEYback to summary
public static final Config.SectionParser<TransferConfig> KEY

Key for Config#get(SectionParser).

protocolVersionback to summary
pack-priv final TransferConfig.ProtocolVersion protocolVersion
Annotations
@Nullable
receiveFsckback to summary
private final boolean receiveFsck
safeForMacOSback to summary
private final boolean safeForMacOS
safeForWindowsback to summary
private final boolean safeForWindows

Constructor Detail

TransferConfigback to summary
public TransferConfig(Repository db)

Create a configuration honoring the repository's settings.

Parameters
db:Repository

the repository to read settings from. The repository is not retained by the new configuration, instead its settings are copied during the constructor.

Since
5.1.4
TransferConfigback to summary
public TransferConfig(Config rc)

Create a configuration honoring settings in a org.eclipse.jgit.lib.Config.

Parameters
rc:Config

the source to read settings from. The source is not retained by the new configuration, instead its settings are copied during the constructor.

Annotations
@SuppressWarnings:nls
Since
5.1.4

Method Detail

getRefFilterback to summary
public RefFilter getRefFilter()

Get org.eclipse.jgit.transport.RefFilter respecting configured hidden refs.

Returns:RefFilter

org.eclipse.jgit.transport.RefFilter respecting configured hidden refs.

Since
3.1
hasDefaultRefFilterback to summary
pack-priv boolean hasDefaultRefFilter()

Like getRefFilter() == RefFilter.DEFAULT, but faster.

Returns:boolean

true if no ref filtering is needed because there are no configured hidden refs.

isAdvertiseObjectInfoback to summary
public boolean isAdvertiseObjectInfo()

Whether to advertise object-info to all clients

Returns:boolean

true to advertise object-info to all clients

Since
5.13
isAdvertiseSidebandAllback to summary
public boolean isAdvertiseSidebandAll()

Whether to advertise sideband all to the clients

Returns:boolean

true to advertise sideband all to the clients

Since
5.6
isAdvertiseWaitForDoneback to summary
public boolean isAdvertiseWaitForDone()

Whether to advertise wait-for-done all to the clients

Returns:boolean

true to advertise wait-for-done all to the clients

Since
5.13
isAllowAnySha1InWantback to summary
public boolean isAllowAnySha1InWant()

Whether to allow clients to request any SHA-1s

Returns:boolean

allow clients to request any SHA-1s?

Since
6.5
isAllowFilterback to summary
public boolean isAllowFilter()

Whether clients are allowed to specify "filter" line

Returns:boolean

true if clients are allowed to specify a "filter" line

Since
5.0
isAllowReachableSha1InWantback to summary
public boolean isAllowReachableSha1InWant()

Whether to allow clients to request non-tip SHA-1s

Returns:boolean

allow clients to request non-tip SHA-1s?

Since
4.1
isAllowReceiveClientSIDback to summary
public boolean isAllowReceiveClientSID()

Whether to advertise and receive session-id capability

Returns:boolean

true to advertise and receive session-id capability

Since
6.4
isAllowRefInWantback to summary
public boolean isAllowRefInWant()

Whether clients are allowed to specify "want-ref" line

Returns:boolean

true if clients are allowed to specify a "want-ref" line

Since
5.1
isAllowSidebandAllback to summary
public boolean isAllowSidebandAll()

Whether the server accepts sideband-all requests

Returns:boolean

true if the server accepts sideband-all requests (see {isAdvertiseSidebandAll() for the advertisement)

Since
5.5
isAllowTipSha1InWantback to summary
public boolean isAllowTipSha1InWant()

Whether to allow clients to request non-advertised tip SHA-1s

Returns:boolean

allow clients to request non-advertised tip SHA-1s?

Since
3.1
newObjectCheckerback to summary
public ObjectChecker newObjectChecker()

Create checker to verify fetched objects

Returns:ObjectChecker

checker to verify fetched objects, or null if checking is not enabled in the repository configuration.

Annotations
@Nullable
Since
3.6
newObjectCheckerback to summary
private ObjectChecker newObjectChecker(boolean check)
newReceiveObjectCheckerback to summary
public ObjectChecker newReceiveObjectChecker()

Create checker to verify objects pushed into this repository

Returns:ObjectChecker

checker to verify objects pushed into this repository, or null if checking is not enabled in the repository configuration.

Annotations
@Nullable
Since
4.2
skipListback to summary
private ObjectIdSet skipList()
org.eclipse.jgit.transport back to summary

pack-priv Class TransferConfig.FsckKeyNameHolder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final Map<String, ObjectChecker.ErrorType>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static String
pack-priv static ObjectChecker.ErrorType
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

errorsback to summary
private static final Map<String, ObjectChecker.ErrorType> errors

Constructor Detail

FsckKeyNameHolderback to summary
private FsckKeyNameHolder()

Method Detail

keyNameForback to summary
private static String keyNameFor(String name)
parseback to summary
pack-priv static ObjectChecker.ErrorType parse(String key)
Annotations
@Nullable
org.eclipse.jgit.transport back to summary

public final Enum TransferConfig.FsckMode

extends Enum<TransferConfig.FsckMode>
Class Inheritance

A git configuration value for how to handle a fsck failure of a particular kind. Used in e.g. fsck.missingEmail.
Since
4.9

Field Summary

Modifier and TypeField and Description
public static final TransferConfig.FsckMode
ERROR

Treat it as an error (the default).

public static final TransferConfig.FsckMode
IGNORE

Ignore the error.

public static final TransferConfig.FsckMode
WARN

Issue a warning (in fact, jgit treats this like IGNORE, but git itself does warn).

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static TransferConfig.FsckMode
public static TransferConfig.FsckMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ERRORback to summary
public static final TransferConfig.FsckMode ERROR

Treat it as an error (the default).

IGNOREback to summary
public static final TransferConfig.FsckMode IGNORE

Ignore the error.

WARNback to summary
public static final TransferConfig.FsckMode WARN

Issue a warning (in fact, jgit treats this like IGNORE, but git itself does warn).

Constructor Detail

FsckModeback to summary
private FsckMode()

Method Detail

valueOfback to summary
public static TransferConfig.FsckMode valueOf(String name)
valuesback to summary
public static TransferConfig.FsckMode[] values()
org.eclipse.jgit.transport back to summary

public final Enum TransferConfig.ProtocolVersion

extends Enum<TransferConfig.ProtocolVersion>
Class Inheritance

A git configuration variable for which versions of the Git protocol to prefer. Used in protocol.version.
Since
5.9

Field Summary

Modifier and TypeField and Description
pack-priv final String
public static final TransferConfig.ProtocolVersion
V0

Git wire protocol version 0 (the default).

public static final TransferConfig.ProtocolVersion
V2

Git wire protocol version 2.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static TransferConfig.ProtocolVersion
parse(String name)

public static TransferConfig.ProtocolVersion
public static TransferConfig.ProtocolVersion[]
public String

Returns:

string version
version
()

Returns version number

Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

nameback to summary
pack-priv final String name

Hides java.lang.Enum.name.

V0back to summary
public static final TransferConfig.ProtocolVersion V0

Git wire protocol version 0 (the default).

V2back to summary
public static final TransferConfig.ProtocolVersion V2

Git wire protocol version 2.

Constructor Detail

ProtocolVersionback to summary
private ProtocolVersion(String name)

Method Detail

parseback to summary
pack-priv static TransferConfig.ProtocolVersion parse(String name)
Annotations
@Nullable
valueOfback to summary
public static TransferConfig.ProtocolVersion valueOf(String name)
valuesback to summary
public static TransferConfig.ProtocolVersion[] values()
versionback to summary
public String version()

Returns version number

Returns:String

string version