This task finds the most recent tag that is reachable from a commit. If the tag points to the commit, then only the tag is shown. Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object and the abbreviated object name of the most recent commit.
Table C.16: Attributes
Name | Type | Description | Default | Required |
---|---|---|---|---|
gitPath | String | Path to Git binary | /usr/bin/git | No |
repository | String | Path to Git repository | n/a | Yes |
outputProperty | String | Property name to set with output value from git-describe. | n/a | No |
all | Boolean | 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. | false | No |
tags | String | Instead of using only the annotated tags, use any tag found in refs/tags namespace. This option enables matching a lightweight (non-annotated) tag. | false | No |
contains | Boolean | Instead of finding the tag that predates the commit, find the tag that comes after the commit, and thus contains it. Automatically implies --tags. | false | No |
long | Boolean | Always output the long format (the tag, the number of commits and the abbreviated commit name) even when it matches a tag. | false | No |
always | Boolean | Show uniquely abbreviated commit object as fallback. | false | No |
abbrev | Integer | Instead of using the default 7 hexadecimal digits as the abbreviated object name, use n digits, or as many digits as needed to form a unique object name. An n of 0 will suppress long format, only showing the closest tag. | n/a | No |
match | String | Only consider tags matching the given glob(7) pattern, excluding the "refs/tags/" prefix. This can be used to avoid leaking private tags from the repository. | n/a | No |
committish | String | Commit-ish object names to describe. Defaults to HEAD if omitted. | HEAD | No |
canditates | Integer | Instead of considering only the 10 most recent tags as candidates to describe the input commit-ish consider up to n candidates. Increasing n above 10 will take slightly longer but may produce a more accurate result. An n of 0 will cause only exact matches to be output. | n/a | No |