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 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 A diff shows the changes between trees, an index or the working dir.
>>> repo.diff()
# Changes between the index and your last commit .. automethod:: pygit2.Repository.diff
>>> self.diff(cached=True)
# Changes in the working tree since your last commit Examples
>>> self.diff('HEAD')
.. code-block:: python
# Changes between commits # Changes between commits
>>> t0 = revparse_single('HEAD') >>> 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 = revparse_single('HEAD').tree
>>> tree.diff_to_tree(swap=True) >>> tree.diff_to_tree(swap=True)
The Diff type The Diff type
==================== ====================

View File

@@ -159,7 +159,9 @@ interfaces.
Return an iterator over the entries of the tree. 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 Tree entries
------------ ------------

View File

@@ -33,7 +33,8 @@ The Index type
.. automethod:: pygit2.Index.write .. automethod:: pygit2.Index.write
.. automethod:: pygit2.Index.read_tree .. automethod:: pygit2.Index.read_tree
.. automethod:: pygit2.Index.write_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 The IndexEntry type