Skip to content

Commit e5c6402

Browse files
authored
Merge pull request #23476 from JuliaLang/ksh/docdoc
Doc SigStruct and DescribeOptions
2 parents 144c46b + 6ff8d13 commit e5c6402

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

base/libgit2/types.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ end
5050
5151
An action signature (e.g. for committers, taggers, etc).
5252
Matches the [`git_signature`](https://libgit2.github.com/libgit2/#HEAD/type/git_signature) struct.
53+
54+
The fields represent:
55+
* `name`: The full name of the committer or author of the commit.
56+
* `email`: The email at which the committer/author can be contacted.
57+
* `when`: a [`TimeStruct`](@ref) indicating when the commit was
58+
authored/committed into the repository.
5359
"""
5460
struct SignatureStruct
5561
name::Ptr{UInt8} # full name of the author
@@ -359,6 +365,20 @@ end
359365
LibGit2.DescribeOptions
360366
361367
Matches the [`git_describe_options`](https://libgit2.github.com/libgit2/#HEAD/type/git_describe_options) struct.
368+
369+
The fields represent:
370+
* `version`: version of the struct in use, in case this changes later. For now, always `1`.
371+
* `max_candidates_tags`: consider this many most recent tags in `refs/tags` to describe a commit.
372+
Defaults to 10 (so that the 10 most recent tags would be examined to see if they describe a commit).
373+
* `describe_strategy`: whether to consider all entries in `refs/tags` (equivalent to `git-describe --tags`)
374+
or all entries in `refs/` (equivalent to `git-describe --all`). The default is to only show annotated tags.
375+
If `Consts.DESCRIBE_TAGS` is passed, all tags, annotated or not, will be considered.
376+
If `Consts.DESCRIBE_ALL` is passed, any ref in `refs/` will be considered.
377+
* `pattern`: only consider tags which match `pattern`. Supports glob expansion.
378+
* `only_follow_first_parent`: when finding the distance from a matching reference to the described
379+
object, only consider the distance from the first parent.
380+
* `show_commit_oid_as_fallback`: if no matching reference can be found which describes a commit, show the
381+
commit's [`GitHash`](@ref) instead of throwing an error (the default behavior).
362382
"""
363383
@kwdef struct DescribeOptions
364384
version::Cuint = 1

0 commit comments

Comments
 (0)