Re: [PATCH] Cleanup git-diff documentation
From: Jakub Narebski <hidden>
Date: 2016-08-11 20:12:01
Brian Gernhardt wrote:
-This command shows changes between four combinations of states. +Show changes between two trees, a tree and the working tree, a +tree and the index file, or the index file and the working tree. +The combination of what is compared with what is determined by +the number of trees given to the command.
You talk here about "number of _trees_" while later you use <commit>, not <tree> or <tree-ish>. Only at the very end you say that <commit> (<commit-ish> because you can use tags as well) can be replaced by any <tree-ish>. That said, I like this clarification, especially the fact that I don't have to go to git-diff-tree(1) to find diff options.
quoted hunk ↗ jump to hunk
'git-diff' [--options] [--] [<path>...]::@@ -25,11 +28,11 @@ This command shows changes between fourcombinations of states. 'git-diff' [--options] --cached [<commit>] [--] [<path>...]:: This form is to view the changes you staged for the next - commit relative to the named <tree-ish>. Typically you + commit relative to the named <commit>. Typically you would want comparison with the latest commit, so if you do not give <commit>, it defaults to HEAD.
-- Jakub Narebski Warsaw, Poland ShadeHawk on #git