DescribeOptions represents the describe operation configuration. You can use DefaultDescribeOptions() to get default options.
| 13 | // |
| 14 | // You can use DefaultDescribeOptions() to get default options. |
| 15 | type DescribeOptions struct { |
| 16 | // How many tags as candidates to consider to describe the input commit-ish. |
| 17 | // Increasing it above 10 will take slightly longer but may produce a more |
| 18 | // accurate result. 0 will cause only exact matches to be output. |
| 19 | MaxCandidatesTags uint // default: 10 |
| 20 | |
| 21 | // By default describe only shows annotated tags. Change this in order |
| 22 | // to show all refs from refs/tags or refs/. |
| 23 | Strategy DescribeOptionsStrategy // default: DescribeDefault |
| 24 | |
| 25 | // Only consider tags matching the given glob(7) pattern, excluding |
| 26 | // the "refs/tags/" prefix. Can be used to avoid leaking private |
| 27 | // tags from the repo. |
| 28 | Pattern string |
| 29 | |
| 30 | // When calculating the distance from the matching tag or |
| 31 | // reference, only walk down the first-parent ancestry. |
| 32 | OnlyFollowFirstParent bool |
| 33 | |
| 34 | // If no matching tag or reference is found, the describe |
| 35 | // operation would normally fail. If this option is set, it |
| 36 | // will instead fall back to showing the full id of the commit. |
| 37 | ShowCommitOidAsFallback bool |
| 38 | } |
| 39 | |
| 40 | // DefaultDescribeOptions returns default options for the describe operation. |
| 41 | func DefaultDescribeOptions() (DescribeOptions, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected