added basic diff example and fixed misleading doc
This commit is contained in:
parent
611e979113
commit
067b00de4f
@ -17,6 +17,12 @@ A diff shows the changes between trees, an index or the working dir::
|
||||
# Diff a tree with the current working dir
|
||||
>>> diff = head.tree.diff()
|
||||
|
||||
# Get all patches for a diff
|
||||
>>> t0 = repo.revparse_single('HEAD^').tree
|
||||
>>> t1 = repo.revparse_single('HEAD~3').tree
|
||||
>>> diff = t0.diff(t1)
|
||||
>>> patches = [p for p in diff]
|
||||
|
||||
|
||||
The Diff type
|
||||
====================
|
||||
|
@ -227,7 +227,7 @@ PyTypeObject DiffIterType = {
|
||||
};
|
||||
|
||||
|
||||
PyDoc_STRVAR(Diff_patch__doc__, "Patch.");
|
||||
PyDoc_STRVAR(Diff_patch__doc__, "Patch diff string.");
|
||||
|
||||
PyObject *
|
||||
Diff_patch__get__(Diff *self)
|
||||
|
Loading…
Reference in New Issue
Block a user