Fixed: documentation for diff_*()-Methods

This commit is contained in:
Nico von Geyso 2013-05-18 16:19:44 +02:00
parent 99263af164
commit 60c37bd7bf
3 changed files with 11 additions and 10 deletions

View File

@ -2,16 +2,15 @@
Diff
**********************************************************************
A diff shows the changes between trees, an index or the working dir::
.. contents::
# Changes in the working tree not yet staged for the next commit
>>> repo.diff()
A diff shows the changes between trees, an index or the working dir.
# Changes between the index and your last commit
>>> self.diff(cached=True)
.. automethod:: pygit2.Repository.diff
# Changes in the working tree since your last commit
>>> self.diff('HEAD')
Examples
.. code-block:: python
# Changes between commits
>>> t0 = revparse_single('HEAD')
@ -32,7 +31,6 @@ A diff shows the changes between trees, an index or the working dir::
>>> tree = revparse_single('HEAD').tree
>>> tree.diff_to_tree(swap=True)
The Diff type
====================

View File

@ -159,7 +159,9 @@ interfaces.
Return an iterator over the entries of the tree.
.. automethod:: pygit2.Tree.diff
.. automethod:: pygit2.Tree.diff_to_tree
.. automethod:: pygit2.Tree.diff_to_workdir
.. automethod:: pygit2.Tree.diff_to_index
Tree entries
------------

View File

@ -33,7 +33,8 @@ The Index type
.. automethod:: pygit2.Index.write
.. automethod:: pygit2.Index.read_tree
.. automethod:: pygit2.Index.write_tree
.. automethod:: pygit2.Index.diff
.. automethod:: pygit2.Index.diff_to_tree
.. automethod:: pygit2.Index.diff_to_workdir
The IndexEntry type