public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: worley@alum•mit.edu (Dale R. Worley)
Cc: git@vger•kernel.org
Subject: Re: [PATCHv2] git-diff: Clarify operation when not inside a repository.
Date: Wed, 28 Aug 2013 15:16:49 -0700	[thread overview]
Message-ID: <xmqq38pt8nqm.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <201308231811.r7NIBeH9027848@freeze.ariadne.com> (Dale R. Worley's message of "Fri, 23 Aug 2013 14:11:40 -0400")

worley@alum•mit.edu (Dale R. Worley) writes:

>> For now, I'll queue your version as-is modulo style fixes, while
>> waiting for others to help polishing the documentation better.
>
> It'd difficult to figure out how to describe it well.  In my
> opinion, the problem here is the DWIM nature of the command,
> ... My preference is ... But that's not how git-diff works.

So given the constraints, I think this is the best we can do.  As nobody
seems to be helping to polish the text, here is my attempt, on top
of your patch.

 Documentation/git-diff.txt | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index b1630ba..33fbd8c 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -28,11 +28,15 @@ two blob objects, or changes between two files on disk.
 	words, the differences are what you _could_ tell Git to
 	further add to the index but you still haven't.  You can
 	stage these changes by using linkgit:git-add[1].
-+
-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 or by
-executing 'git diff' outside of a working tree.
+
+'git diff' --no-index [--options] [--] [<path>...]::
+
+	This form is to compare the given two paths on the
+	filesystem.  You can omit the `--no-index` option when
+	running the command in a working tree controlled by Git and
+	at least one of the paths points outside the working tree,
+	or when running the command outside a working tree
+	controlled by Git.
 
 'git diff' [--options] --cached [<commit>] [--] [<path>...]::
 

  reply	other threads:[~2013-08-28 22:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21 17:34 [PATCH] git-diff: Clarify operation when not inside a repository Dale R. Worley
2013-08-21 18:33 ` Junio C Hamano
2013-08-22 20:31   ` [PATCHv2] " Dale R. Worley
2013-08-22 20:54     ` Junio C Hamano
2013-08-23 18:11       ` Dale R. Worley
2013-08-28 22:16         ` Junio C Hamano [this message]
2013-08-29 15:44           ` Dale R. Worley

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

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

  git send-email \
    --in-reply-to=xmqq38pt8nqm.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=worley@alum$(echo .)mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox