Package org.eclipse.jgit.transport
Class TransferConfig
- java.lang.Object
-
- org.eclipse.jgit.transport.TransferConfig
-
public class TransferConfig extends java.lang.Object
The standard "transfer", "fetch", "protocol", "receive", and "uploadpack" configuration parameters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
TransferConfig.FsckKeyNameHolder
static class
TransferConfig.FsckMode
A git configuration value for how to handle a fsck failure of a particular kind.(package private) static class
TransferConfig.ProtocolVersion
A git configuration variable for which versions of the Git protocol to prefer.
-
Field Summary
Fields Modifier and Type Field Description private boolean
advertiseSidebandAll
private boolean
allowFilter
private boolean
allowInvalidPersonIdent
private boolean
allowReachableSha1InWant
private boolean
allowRefInWant
private boolean
allowSidebandAll
private boolean
allowTipSha1InWant
private boolean
fetchFsck
private static java.lang.String
FSCK
private java.lang.String
fsckSkipList
(package private) java.lang.String[]
hideRefs
private java.util.EnumSet<ObjectChecker.ErrorType>
ignore
static Config.SectionParser<TransferConfig>
KEY
Key forConfig.get(SectionParser)
.(package private) TransferConfig.ProtocolVersion
protocolVersion
private boolean
receiveFsck
private boolean
safeForMacOS
private boolean
safeForWindows
-
Constructor Summary
Constructors Constructor Description TransferConfig(Config rc)
Create a configuration honoring settings in aConfig
.TransferConfig(Repository db)
Create a configuration honoring the repository's settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RefFilter
getRefFilter()
GetRefFilter
respecting configured hidden refs.(package private) boolean
hasDefaultRefFilter()
LikegetRefFilter() == RefFilter.DEFAULT
, but faster.boolean
isAdvertiseSidebandAll()
boolean
isAllowFilter()
boolean
isAllowReachableSha1InWant()
Whether to allow clients to request non-tip SHA-1sboolean
isAllowRefInWant()
boolean
isAllowSidebandAll()
boolean
isAllowTipSha1InWant()
Whether to allow clients to request non-advertised tip SHA-1sObjectChecker
newObjectChecker()
Create checker to verify fetched objectsprivate ObjectChecker
newObjectChecker(boolean check)
ObjectChecker
newReceiveObjectChecker()
Create checker to verify objects pushed into this repositoryprivate ObjectIdSet
skipList()
-
-
-
Field Detail
-
FSCK
private static final java.lang.String FSCK
- See Also:
- Constant Field Values
-
KEY
public static final Config.SectionParser<TransferConfig> KEY
Key forConfig.get(SectionParser)
.
-
fetchFsck
private final boolean fetchFsck
-
receiveFsck
private final boolean receiveFsck
-
fsckSkipList
private final java.lang.String fsckSkipList
-
ignore
private final java.util.EnumSet<ObjectChecker.ErrorType> ignore
-
allowInvalidPersonIdent
private final boolean allowInvalidPersonIdent
-
safeForWindows
private final boolean safeForWindows
-
safeForMacOS
private final boolean safeForMacOS
-
allowRefInWant
private final boolean allowRefInWant
-
allowTipSha1InWant
private final boolean allowTipSha1InWant
-
allowReachableSha1InWant
private final boolean allowReachableSha1InWant
-
allowFilter
private final boolean allowFilter
-
allowSidebandAll
private final boolean allowSidebandAll
-
advertiseSidebandAll
private final boolean advertiseSidebandAll
-
protocolVersion
@Nullable final TransferConfig.ProtocolVersion protocolVersion
-
hideRefs
final java.lang.String[] hideRefs
-
-
Constructor Detail
-
TransferConfig
public TransferConfig(Repository db)
Create a configuration honoring the repository's settings.- Parameters:
db
- 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
-
-
Method Detail
-
newObjectChecker
@Nullable public ObjectChecker newObjectChecker()
Create checker to verify fetched objects- Returns:
- checker to verify fetched objects, or null if checking is not enabled in the repository configuration.
- Since:
- 3.6
-
newReceiveObjectChecker
@Nullable public ObjectChecker newReceiveObjectChecker()
Create checker to verify objects pushed into this repository- Returns:
- checker to verify objects pushed into this repository, or null if checking is not enabled in the repository configuration.
- Since:
- 4.2
-
newObjectChecker
private ObjectChecker newObjectChecker(boolean check)
-
skipList
private ObjectIdSet skipList()
-
isAllowTipSha1InWant
public boolean isAllowTipSha1InWant()
Whether to allow clients to request non-advertised tip SHA-1s- Returns:
- allow clients to request non-advertised tip SHA-1s?
- Since:
- 3.1
-
isAllowReachableSha1InWant
public boolean isAllowReachableSha1InWant()
Whether to allow clients to request non-tip SHA-1s- Returns:
- allow clients to request non-tip SHA-1s?
- Since:
- 4.1
-
isAllowFilter
public boolean isAllowFilter()
- Returns:
- true if clients are allowed to specify a "filter" line
- Since:
- 5.0
-
isAllowRefInWant
public boolean isAllowRefInWant()
- Returns:
- true if clients are allowed to specify a "want-ref" line
- Since:
- 5.1
-
isAllowSidebandAll
public boolean isAllowSidebandAll()
- Returns:
- true if the server accepts sideband-all requests (see
{
isAdvertiseSidebandAll()
for the advertisement) - Since:
- 5.5
-
isAdvertiseSidebandAll
public boolean isAdvertiseSidebandAll()
- Returns:
- true to advertise sideband all to the clients
- Since:
- 5.6
-
getRefFilter
public RefFilter getRefFilter()
GetRefFilter
respecting configured hidden refs.- Returns:
RefFilter
respecting configured hidden refs.- Since:
- 3.1
-
hasDefaultRefFilter
boolean hasDefaultRefFilter()
LikegetRefFilter() == RefFilter.DEFAULT
, but faster.- Returns:
true
if no ref filtering is needed because there are no configured hidden refs.
-
-