Skip to content

Commit

Permalink
repository: document describe_strategy options
Browse files Browse the repository at this point in the history
The documentation for Repository.describe() hinted at the GIT_DESCRIBE_*
options constants.

List the valid constants and describe their behavior to make it clearer
for the user.
  • Loading branch information
ktdreyer committed Nov 10, 2017
1 parent 633ec75 commit 4d78736
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pygit2/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,16 @@ def describe(self, committish=None, max_candidates_tags=None,
consider. Increasing above 10 will take slightly longer but may
produce a more accurate result. A value of 0 will cause only exact
matches to be output.
:param int describe_strategy: A GIT_DESCRIBE_* constant.
:param int describe_strategy: A `GIT_DESCRIBE_*` constant. Can be one
of:
* `GIT_DESCRIBE_DEFAULT` - Only match annotated tags. (This is
equivalent to setting this parameter to `None`.)
* `GIT_DESCRIBE_TAGS` - Match everything under refs/tags/
(includes lightweight tags).
* `GIT_DESCRIBE_ALL` - Match everything under refs/ (includes
branches).
:param str pattern: Only consider tags matching the given `glob(7)`
pattern, excluding the "refs/tags/" prefix.
:param bool only_follow_first_parent: Follow only the first parent
Expand Down

0 comments on commit 4d78736

Please sign in to comment.