More obvious diff example
By diffing HEAD~1 with HEAD, we show the effect of the latest commit. The provided example diffed HEAD with HEAD~1, which shows a diff that goes back in time.
This commit is contained in:
@@ -212,7 +212,7 @@ A diff shows the changes between trees, an index or the working dir::
|
|||||||
# Diff two trees
|
# Diff two trees
|
||||||
>>> t0 = repo.head.tree
|
>>> t0 = repo.head.tree
|
||||||
>>> t1 = repo.head.parents[0].tree
|
>>> t1 = repo.head.parents[0].tree
|
||||||
>>> diff = t0.diff(t1)
|
>>> diff = t1.diff(t0)
|
||||||
>>> diff
|
>>> diff
|
||||||
|
|
||||||
# Diff a tree with the index
|
# Diff a tree with the index
|
||||||
|
Reference in New Issue
Block a user