Skip to content

Commit

Permalink
Make describe docs more accurate/informative (#23477)
Browse files Browse the repository at this point in the history
* Make describe docs more accurate/informative
  • Loading branch information
kshyatt authored Aug 28, 2017
1 parent 05037f5 commit 144c46b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
22 changes: 18 additions & 4 deletions base/libgit2/repository.jl
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,16 @@ contains detailed information about it based on the keyword argument:
* `options::DescribeOptions=DescribeOptions()`
Equivalent to `git describe <commitish>`.
A git decription of a `commitish` object looks for the tag (by default, annotated,
although a search of all tags can be performed) which can be reached from `commitish`
which is most recent. If the tag is pointing to `commitish`, then only the tag is
included in the description. Otherwise, a suffix is included which contains the
number of commits between `commitish` and the most recent tag. If there is no such
tag, the default behavior is for the description to fail, although this can be
changed through `options`.
Equivalent to `git describe <commitish>`. See [`DescribeOptions`](@ref) for more
information.
"""
function GitDescribeResult(commitish::GitObject;
options::DescribeOptions=DescribeOptions())
Expand All @@ -265,14 +274,19 @@ end
"""
LibGit2.GitDescribeResult(repo::GitRepo; kwarg...)
Produce a `GitDescribeResult` of the repository `repo`'s working directory,
which can include all the commits and tags (or, for instance, HEAD only).
Produce a `GitDescribeResult` of the repository `repo`'s working directory.
The `GitDescribeResult` contains detailed information about the workdir based
on the keyword argument:
* `options::DescribeOptions=DescribeOptions()`
Equivalent to `git describe`.
In this case, the description is run on HEAD, producing the most recent tag
which is an ancestor of HEAD. Afterwards, a status check on
the [`workdir`](@ref) is performed and if the `workdir` is dirty
(see [`isdirty`](@ref)) the description is also considered dirty.
Equivalent to `git describe`. See [`DescribeOptions`](@ref) for more
information.
"""
function GitDescribeResult(repo::GitRepo; options::DescribeOptions=DescribeOptions())
result_ptr_ptr = Ref{Ptr{Void}}(C_NULL)
Expand Down
2 changes: 2 additions & 0 deletions doc/src/devdocs/libgit2.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Base.LibGit2.Buffer
Base.LibGit2.CachedCredentials
Base.LibGit2.CheckoutOptions
Base.LibGit2.CloneOptions
Base.LibGit2.DescribeOptions
Base.LibGit2.DescribeFormatOptions
Base.LibGit2.DiffDelta
Base.LibGit2.DiffFile
Base.LibGit2.DiffOptionsStruct
Expand Down

2 comments on commit 144c46b

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.