diff options
author | Jeff King <peff@peff.net> | 2010-11-04 17:17:29 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-05 10:05:46 -0700 |
commit | 49bd56a5f7b09f89b59a6a77d331e8f85f6d7fde (patch) | |
tree | 4efeb0656991bf133ec28baf6b14b4e2fb919989 /Documentation/git-diff.txt | |
parent | 9edb8a0f7b3e2ca06b360abce2e2aaa2b5760a68 (diff) | |
download | git-49bd56a5f7b09f89b59a6a77d331e8f85f6d7fde.tar.gz git-49bd56a5f7b09f89b59a6a77d331e8f85f6d7fde.tar.xz |
docs: clarify git diff modes of operation
It is an oversimplification to say that we can take
"[<commit> [<commit>]]", as it really depends on what
options have been given. Instead, let's list the major modes
of operation separately, as we do in other manpages.
This patch also adjusts the text immediately after the
synopsis to match the lines given in the synopsis.
For git-difftool, which has the same issue, let's refer the
user to the git-diff manpage rather than spelling it all out
again.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-diff.txt')
-rw-r--r-- | Documentation/git-diff.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 61728f697..f6ac84750 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -8,12 +8,17 @@ git-diff - Show changes between commits, commit and working tree, etc SYNOPSIS -------- -'git diff' [<common diff options>] [<commit> [<commit>]] [--] [<path>...] +[verse] +'git diff' [options] [<commit>] [--] [<path>...] +'git diff' [options] --cached [<commit>] [--] [<path>...] +'git diff' [options] <commit> <commit> [--] [<path>...] +'git diff' [options] [--no-index] [--] <path> <path> DESCRIPTION ----------- -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. +Show changes between the working tree and the index or a tree, changes +between the index and a tree, changes between two trees, or changes +between two files on disk. 'git diff' [--options] [--] [<path>...]:: |