@matheusbsbs / matheus-bagliano / commits / 36f05ef485
Fork 0

Illustration: "Git Diff Types"

Jon Loeliger's ASCII art in the Tutorial. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Nov 3, 2005 at 13:52 UTC 36f05ef485d023eda3bf750e7b207d07d5feb39d
1 file changed +35
Documentation/tutorial.txt
+35
@@ -455,6 +455,41 @@ the same diff that we've already seen several times, we can now do
455 (again, `-p` means to show the difference as a human-readable patch),
456 and it will show what the last commit (in `HEAD`) actually changed.
457
458 +[NOTE]
459 +============
460 +Here is an ASCII art by Jon Loeliger that illustrates how
461 +various diff-\* commands compare things.
462 +
463 + diff-tree
464 + +----+
465 + | |
466 + | |
467 + V V
468 + +-----------+
469 + | Object DB |
470 + | Backing |
471 + | Store |
472 + +-----------+
473 + ^ ^
474 + | |
475 + | | diff-index --cached
476 + | |
477 + diff-index | V
478 + | +-----------+
479 + | | Index |
480 + | | "cache" |
481 + | +-----------+
482 + | ^
483 + | |
484 + | | diff-files
485 + | |
486 + V V
487 + +-----------+
488 + | Working |
489 + | Directory |
490 + +-----------+
491 +============
492 +
493 More interestingly, you can also give `git-diff-tree` the `-v` flag, which
494 tells it to also show the commit message and author and date of the
495 commit, and you can tell it to show a whole series of diffs.