libgit2

git_describe_options

Version:

Describe options structure

Initialize with GIT_DESCRIBE_OPTIONS_INIT macro to correctly set the version field. E.g.

git_describe_options opts = GIT_DESCRIBE_OPTIONS_INIT;

Signature

typedef struct git_describe_options { unsigned int version unsigned int max_candidates_tags unsigned int describe_strategy const char *pattern int only_follow_first_parent int show_commit_oid_as_fallback };

Members

unsigned int
version
unsigned int
max_candidates_tags
unsigned int
describe_strategy

default: 10

const char *
pattern

default: GIT_DESCRIBE_DEFAULT

int
only_follow_first_parent

When calculating the distance from the matching tag or reference, only walk down the first-parent ancestry.

int
show_commit_oid_as_fallback

If no matching tag or reference is found, the describe operation would normally fail. If this option is set, it will instead fall back to showing the full id of the commit.

Parameter To

Versions