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:
Eric Schrijver
2012-09-05 03:03:54 +03:00
parent dc1cfe80e6
commit 32ff474dc1

View File

@@ -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