From 49bd56a5f7b09f89b59a6a77d331e8f85f6d7fde Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 4 Nov 2010 17:17:29 -0400 Subject: [PATCH] docs: clarify git diff modes of operation It is an oversimplification to say that we can take "[ []]", 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 Signed-off-by: Junio C Hamano --- Documentation/git-diff.txt | 11 ++++++++--- Documentation/git-difftool.txt | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 61728f6974..f6ac847507 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' [] [ []] [--] [...] +[verse] +'git diff' [options] [] [--] [...] +'git diff' [options] --cached [] [--] [...] +'git diff' [options] [--] [...] +'git diff' [options] [--no-index] [--] 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] [--] [...]:: diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt index a02e3b5190..6fffbc7bf8 100644 --- a/Documentation/git-difftool.txt +++ b/Documentation/git-difftool.txt @@ -13,7 +13,8 @@ DESCRIPTION ----------- 'git difftool' is a git command that allows you to compare and edit files between revisions using common diff tools. 'git difftool' is a frontend -to 'git diff' and accepts the same options and arguments. +to 'git diff' and accepts the same options and arguments. See +linkgit:git-diff[1]. OPTIONS ------- -- 2.11.4.GIT