Provide a doc example for discover_repository

To clarify the behaviour and usage.
This commit is contained in:
Michael Jones
2014-06-09 22:28:04 +01:00
parent bd322fa132
commit 28ae47f42b

View File

@@ -33,6 +33,11 @@ Functions
.. autofunction:: pygit2.discover_repository
Example::
>>> current_working_directory = os.getcwd()
>>> repository_path = discover_repository(current_working_directory)
>>> repo = Repository(repository_path)
The Repository class