Doc fixes: change head.oid to head.target in examples
This commit is contained in:
parent
179c7db940
commit
d5c0a23630
@ -16,7 +16,7 @@ Show HEAD commit
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> commit = repo[repo.head.oid]
|
||||
>>> commit = repo[repo.head.target]
|
||||
>>> commit.message
|
||||
'commit message'
|
||||
|
||||
@ -30,7 +30,7 @@ Traverse commit history
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> last = repo[repo.head.oid]
|
||||
>>> last = repo[repo.head.target]
|
||||
>>> for commit in repo.walk(last.oid, pygit2.GIT_SORT_TIME):
|
||||
>>> print(commit.message) # or some other operation
|
||||
|
||||
|
@ -591,9 +591,9 @@ PyDoc_STRVAR(Repository_walk__doc__,
|
||||
" >>> from pygit2 import Repository\n"
|
||||
" >>> from pygit2 import GIT_SORT_TOPOLOGICAL, GIT_SORT_REVERSE\n"
|
||||
" >>> repo = Repository('.git')\n"
|
||||
" >>> for commit in repo.walk(repo.head.oid, GIT_SORT_TOPOLOGICAL):\n"
|
||||
" >>> for commit in repo.walk(repo.head.target, GIT_SORT_TOPOLOGICAL):\n"
|
||||
" ... print commit.message\n"
|
||||
" >>> for commit in repo.walk(repo.head.oid, GIT_SORT_TOPOLOGICAL | GIT_SORT_REVERSE):\n"
|
||||
" >>> for commit in repo.walk(repo.head.target, GIT_SORT_TOPOLOGICAL | GIT_SORT_REVERSE):\n"
|
||||
" ... print commit.message\n"
|
||||
" >>>\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user