| Modifier and Type | Field and Description |
|---|---|
| private int | abbrev
The prefix length to use when abbreviating a commit hash. |
| private boolean | always
Whether to show a uniquely abbreviated commit hash as a fallback or not. |
| private List | excludeMatchers
Pattern matchers to be applied to tags for exclusion. |
| private boolean | longDesc
Whether to always use long output format or not. |
| private List | matchers
Pattern matchers to be applied to tags under consideration. |
| private int | maxCandidates
How many tags we'll consider as candidates. |
| private final Comparator | |
| private RevCommit | target
Commit to describe. |
| private boolean | useAll
Whether to use all refs in the refs/ namespace |
| private boolean | useTags
Whether to use all tags (incl. |
| private final RevWalk |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public String | call()
Implements abstract org. Implements java. Computes a result, or throws an exception if unable to do so. |
| private boolean | Returns: true if it should be used for describe or not regardingorg.reference under inspection ref)Whether we use lightweight tags or not for describe Candidates |
| private String | Returns: the tag name with its prefix removedthe name of the tag name)Removes the refs/ or refs/tags prefix from tag names |
| private Optional | |
| private ObjectId | |
| private String | |
| public DescribeCommand | Returns: thisminimum length of the abbreviated string. Must be in the range
[4,
40]. abbrev)Sets the prefix length to use when abbreviating an object SHA-1. |
| public DescribeCommand | Returns: thistrue enables matching any ref found in refs/
like setting option --all in c gitInstead of using only the annotated tags, use any ref found in refs/ namespace. |
| public DescribeCommand | Returns: thistrue enables falling back to a uniquely
abbreviated commit hashAlways describe the commit by eventually falling back to a uniquely abbreviated commit hash if no other name matches. |
| public DescribeCommand | Returns: thisthe patterns)glob(7) pattern or patternsSets one or more |
| public DescribeCommand | Returns: thistrue if always the long format should be used.Determine whether always to use the long format or not. |
| public DescribeCommand | |
| public DescribeCommand | Returns: thistrue enables matching lightweight (non-annotated)
tags like setting option --tags in c gitInstead of using only the annotated tags, use any tag found in refs/tags namespace. |
| public DescribeCommand | |
| public DescribeCommand | Returns: thisCommit ID, tag, branch, ref, etc. See
rev)org. for
allowed syntax.Sets the commit to be described. |
| abbrev | back to summary |
|---|---|
| private int abbrev The prefix length to use when abbreviating a commit hash. | |
| always | back to summary |
|---|---|
| private boolean always Whether to show a uniquely abbreviated commit hash as a fallback or not. | |
| excludeMatchers | back to summary |
|---|---|
| private List<FileNameMatcher> excludeMatchers Pattern matchers to be applied to tags for exclusion. | |
| longDesc | back to summary |
|---|---|
| private boolean longDesc Whether to always use long output format or not. | |
| matchers | back to summary |
|---|---|
| private List<FileNameMatcher> matchers Pattern matchers to be applied to tags under consideration. | |
| maxCandidates | back to summary |
|---|---|
| private int maxCandidates How many tags we'll consider as candidates. This can only go up to the number of flags JGit can support in a walk, which is 24. | |
| TAG_TIE_BREAKER | back to summary |
|---|---|
| private final Comparator<Ref> TAG_TIE_BREAKER | |
| target | back to summary |
|---|---|
| private RevCommit target Commit to describe. | |
| useAll | back to summary |
|---|---|
| private boolean useAll Whether to use all refs in the refs/ namespace | |
| useTags | back to summary |
|---|---|
| private boolean useTags Whether to use all tags (incl. lightweight) or not. | |
| w | back to summary |
|---|---|
| private final RevWalk w | |
| DescribeCommand | back to summary |
|---|---|
| protected DescribeCommand(Repository repo) Constructor for DescribeCommand.
| |
| call | back to summary |
|---|---|
| public String call() throws GitAPIException Implements abstract org. Implements java. Doc from org. Computes a result, or throws an exception if unable to do so. Execute the command Describes the specified commit. Target defaults to HEAD if no commit was set explicitly.
| |
| filterLightweightTags | back to summary |
|---|---|
| private boolean filterLightweightTags(Ref ref) Whether we use lightweight tags or not for describe Candidates
| |
| formatRefName | back to summary |
|---|---|
| private String formatRefName(String name) Removes the refs/ or refs/tags prefix from tag names | |
| getBestMatch | back to summary |
|---|---|
| private Optional | |
| getObjectIdFromRef | back to summary |
|---|---|
| private ObjectId getObjectIdFromRef(Ref r) throws JGitInternalException | |
| longDescription | back to summary |
|---|---|
| private String longDescription(Ref tag, int depth, ObjectId tip) throws IOException | |
| setAbbrev | back to summary |
|---|---|
| public DescribeCommand setAbbrev(int abbrev) Sets the prefix length to use when abbreviating an object SHA-1.
| |
| setAll | back to summary |
|---|---|
| public DescribeCommand setAll(boolean all) Instead of using only the annotated tags, use any ref found in refs/ namespace. This option enables matching any known branch, remote-tracking branch, or lightweight tag.
| |
| setAlways | back to summary |
|---|---|
| public DescribeCommand setAlways(boolean always) Always describe the commit by eventually falling back to a uniquely abbreviated commit hash if no other name matches.
| |
| setExclude | back to summary |
|---|---|
| public DescribeCommand setExclude(String... patterns) throws InvalidPatternException Sets one or more
| |
| setLong | back to summary |
|---|---|
| public DescribeCommand setLong(boolean longDesc) Determine whether always to use the long format or not. When set to
| |
| setMatch | back to summary |
|---|---|
| public DescribeCommand setMatch(String... patterns) throws InvalidPatternException Sets one or more
| |
| setTags | back to summary |
|---|---|
| public DescribeCommand setTags(boolean tags) Instead of using only the annotated tags, use any tag found in refs/tags namespace. This option enables matching lightweight (non-annotated) tags or not.
| |
| setTarget | back to summary |
|---|---|
| public DescribeCommand setTarget(ObjectId target) throws IOException Sets the commit to be described.
| |
| setTarget | back to summary |
|---|---|
| public DescribeCommand setTarget(String rev) throws IOException, RefNotFoundException Sets the commit to be described.
| |