Add example for repo.walk pydoc
This commit is contained in:
parent
4f83209a9a
commit
785b5112ab
@ -540,7 +540,14 @@ Repository_merge_base(Repository *self, PyObject *args)
|
|||||||
PyDoc_STRVAR(Repository_walk__doc__,
|
PyDoc_STRVAR(Repository_walk__doc__,
|
||||||
"walk(oid, sort_mode) -> iterator\n"
|
"walk(oid, sort_mode) -> iterator\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Generator that traverses the history starting from the given commit.");
|
"Generator that traverses the history starting from the given commit.\n"
|
||||||
|
"\n"
|
||||||
|
"Example:\n"
|
||||||
|
"\n"
|
||||||
|
"import pygit2"
|
||||||
|
"repo = pygit2.Repository(.git)\n"
|
||||||
|
"for object in repo.walk(repo.head.oid, pygit2.GIT_SORT_TOPOLOGICAL):\n"
|
||||||
|
" print object.message");
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
Repository_walk(Repository *self, PyObject *args)
|
Repository_walk(Repository *self, PyObject *args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user