Fixed: documentation for diff_*()-Methods
This commit is contained in:
@@ -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
|
||||||
====================
|
====================
|
||||||
|
|
||||||
|
@@ -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
|
||||||
------------
|
------------
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user