java.lang.Object
org.eclipse.jgit.lib.AbbrevConfig
Git configuration option
core.abbrev
- Since:
- 6.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The minimum value of abbrevstatic final AbbrevConfig
No abbreviation -
Method Summary
Modifier and TypeMethodDescriptionstatic int
capAbbrev
(int len) Cap configured core.abbrev to range between minimum of 4 and number of hex-digits of a full object id.int
get()
Get the configured abbreviation length for object ids.static AbbrevConfig
parseFromConfig
(Repository repo) Parse string value of core.abbrev git option for a given repositorytoString()
-
Field Details
-
MIN_ABBREV
public static final int MIN_ABBREVThe minimum value of abbrev- See Also:
-
NO
No abbreviation
-
-
Method Details
-
capAbbrev
public static int capAbbrev(int len) Cap configured core.abbrev to range between minimum of 4 and number of hex-digits of a full object id.- Parameters:
len
- configured number of hex-digits to abbreviate object ids to- Returns:
- core.abbrev capped to range between minimum of 4 and number of hex-digits of a full object id
-
parseFromConfig
Parse string value of core.abbrev git option for a given repository- Parameters:
repo
- repository- Returns:
- the parsed AbbrevConfig
- Throws:
InvalidConfigurationException
- if value of core.abbrev is invalid
-
get
public int get()Get the configured abbreviation length for object ids.- Returns:
- the configured abbreviation length for object ids
-
toString
-