summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-03 21:52:44 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-03 22:55:48 (GMT)
commit36f05ef485d023eda3bf750e7b207d07d5feb39d (patch)
tree79675c76927c9bac7463b74c3a23242609cf02b5 /Documentation
parent66158e331b385a81ac825c208c6160a0cdd2324c (diff)
downloadgit-36f05ef485d023eda3bf750e7b207d07d5feb39d.zip
git-36f05ef485d023eda3bf750e7b207d07d5feb39d.tar.gz
git-36f05ef485d023eda3bf750e7b207d07d5feb39d.tar.bz2
Illustration: "Git Diff Types"
Jon Loeliger's ASCII art in the Tutorial. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/tutorial.txt35
1 files changed, 35 insertions, 0 deletions
diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt
index 20a4cb1..214673d 100644
--- a/Documentation/tutorial.txt
+++ b/Documentation/tutorial.txt
@@ -455,6 +455,41 @@ the same diff that we've already seen several times, we can now do
(again, `-p` means to show the difference as a human-readable patch),
and it will show what the last commit (in `HEAD`) actually changed.
+[NOTE]
+============
+Here is an ASCII art by Jon Loeliger that illustrates how
+various diff-\* commands compare things.
+
+ diff-tree
+ +----+
+ | |
+ | |
+ V V
+ +-----------+
+ | Object DB |
+ | Backing |
+ | Store |
+ +-----------+
+ ^ ^
+ | |
+ | | diff-index --cached
+ | |
+ diff-index | V
+ | +-----------+
+ | | Index |
+ | | "cache" |
+ | +-----------+
+ | ^
+ | |
+ | | diff-files
+ | |
+ V V
+ +-----------+
+ | Working |
+ | Directory |
+ +-----------+
+============
+
More interestingly, you can also give `git-diff-tree` the `-v` flag, which
tells it to also show the commit message and author and date of the
commit, and you can tell it to show a whole series of diffs.