MCPcopy Create free account
hub / github.com/libgit2/git2go / DefaultDescribeOptions

Function DefaultDescribeOptions

describe.go:41–55  ·  view source on GitHub ↗

DefaultDescribeOptions returns default options for the describe operation.

()

Source from the content-addressed store, hash-verified

39
40// DefaultDescribeOptions returns default options for the describe operation.
41func 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//

Callers 1

TestDescribeCommitFunction · 0.85

Calls 2

MakeGitErrorFunction · 0.85
DescribeOptionsStrategyTypeAlias · 0.85

Tested by 1

TestDescribeCommitFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…