DefaultDescribeOptions returns default options for the describe operation.
()
| 39 | |
| 40 | // DefaultDescribeOptions returns default options for the describe operation. |
| 41 | func DefaultDescribeOptions() (DescribeOptions, error) { |
| 42 | runtime.LockOSThread() |
| 43 | defer runtime.UnlockOSThread() |
| 44 | |
| 45 | opts := C.git_describe_options{} |
| 46 | ecode := C.git_describe_options_init(&opts, C.GIT_DESCRIBE_OPTIONS_VERSION) |
| 47 | if ecode < 0 { |
| 48 | return DescribeOptions{}, MakeGitError(ecode) |
| 49 | } |
| 50 | |
| 51 | return DescribeOptions{ |
| 52 | MaxCandidatesTags: uint(opts.max_candidates_tags), |
| 53 | Strategy: DescribeOptionsStrategy(opts.describe_strategy), |
| 54 | }, nil |
| 55 | } |
| 56 | |
| 57 | // DescribeFormatOptions can be used for formatting the describe string. |
| 58 | // |
searching dependent graphs…