java.lang.Object
org.eclipse.jgit.lib.AbbrevConfig
Git configuration option <a
href=https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreabbrev">
core.abbrev
- Since:
- 6.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe minimum value of abbrevstatic final AbbrevConfigNo abbreviation -
Method Summary
Modifier and TypeMethodDescriptionstatic intcapAbbrev(int len) Cap configured core.abbrev to range between minimum of 4 and number of hex-digits of a full object id.intget()Get the configured abbreviation length for object ids.static AbbrevConfigparseFromConfig(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
-