git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Yann Dirson <dirson@bertin.fr>
Cc: "Santi Béjar" <santi@agolina.net>, git@vger.kernel.org
Subject: [RFC/PATCH 5/4] Documentation: flesh out diff --no-index description
Date: Mon, 11 Oct 2010 11:07:18 -0500	[thread overview]
Message-ID: <20101011160718.GF25842@burratino> (raw)
In-Reply-To: <20101011160224.GA25842@burratino>

Explain what diff --no-index is used for in more detail.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Documentation/git-diff.txt |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index dd1fb32..6700e8c 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -25,7 +25,7 @@ tree and the index file, or the index file and the working tree.
 +
 If exactly two paths are given and at least one points outside
 the current repository, 'git diff' will compare the two files /
-directories. This behavior can be forced by --no-index.
+directories (see --no-index below).
 
 'git diff' [--options] --cached [<commit>] [--] [<path>...]::
 
@@ -62,11 +62,24 @@ directories. This behavior can be forced by --no-index.
 	"git diff $(git-merge-base A B) B".  You can omit any one
 	of <commit>, which has the same effect as using HEAD instead.
 
+'git diff' [--options] --no-index [--] <path> <path>::
+
+	In this form, 'git diff' will compare a pair of files or
+	directories that are not necessarily being managed by git.
+	The tracked content of files in the index and the object
+	database are ignored.
++
+In other words, this form allows 'git diff' to be used as a
+traditional 'diff' command (plus the familiar extras like --check,
+color, pagination, automatic use of -r, --stat/--name-status,
+--pickaxe, --binary, copy/rename detection, -Oorderfile, and
+--patience).
+
 Just in case if you are doing something exotic, it should be
 noted that all of the <commit> in the above description, except
-in the last two forms that use ".." notations, can be any
-<tree>.  The third form ('git diff <commit> <commit>') can also
-be used to compare two <blob> objects.
+in the two forms that use ".." notations, can be any <tree>.
+The third form ('git diff <commit> <commit>') can also be used
+to compare two <blob> objects.
 
 For a more complete list of ways to spell <commit>, see
 "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
-- 
1.7.2.3

  parent reply	other threads:[~2010-10-11 16:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11 13:03 Undocumented git-diff syntax Yann Dirson
2010-10-11 13:59 ` Santi Béjar
2010-10-11 14:17   ` Yann Dirson
2010-10-11 14:52     ` Santi Béjar
2010-10-11 16:02     ` [PATCH 0/4] " Jonathan Nieder
2010-10-11 16:03       ` [PATCH 1/5] Documentation: gitrevisions is in section 7 Jonathan Nieder
2010-10-11 20:49         ` Sverre Rabbelier
2010-10-11 16:04       ` [PATCH 2/4] Documentation: diff can compare blobs Jonathan Nieder
2010-10-11 16:05       ` [PATCH 3/4] Documentation: expand 'git diff' SEE ALSO section Jonathan Nieder
2010-10-11 16:06       ` [PATCH 4/4] Documentation: update "git diff --no-index" description Jonathan Nieder
2010-10-11 16:07       ` Jonathan Nieder [this message]
2010-10-13 22:40         ` [RFC/PATCH 5/4] Documentation: flesh out diff --no-index description Junio C Hamano
2010-10-11 18:52       ` [PATCH 0/4] Re: Undocumented git-diff syntax Yann Dirson
2010-10-11 20:56       ` Sverre Rabbelier
2010-10-11 16:57     ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101011160718.GF25842@burratino \
    --to=jrnieder@gmail.com \
    --cc=dirson@bertin.fr \
    --cc=git@vger.kernel.org \
    --cc=santi@agolina.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).