git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jakub Narebski <jnareb@gmail.com>,
	Jon Smirl <jonsmirl@gmail.com>
Subject: [PATCH] Documentation/git-diff: remove -r from --name-status example
Date: Sat, 28 Jul 2007 20:24:27 -0400	[thread overview]
Message-ID: <20070729002427.GA1566@coredump.intra.peff.net> (raw)

Calling 'git-diff --name-status' will recursively show any
changes already, and it has for quite some time (at least as
far back as v1.4.1).

Signed-off-by: Jeff King <peff@peff.net>
---
On Sat, Jul 28, 2007 at 05:26:27PM +0200, Jakub Narebski wrote:

> > How about --name-status?
> 
> Or -r --name-status?

The '-r' now seems to be superfluous. I checked using the following
script:

  mkdir repo && cd repo && git-init &&
    touch root && git-add root && git-commit -m root &&
    mkdir sub && touch sub/file && git-add sub/file &&
    git-diff --cached --name-status

And it correctly reports

  A sub/file

at least since v1.4.1. I didn't look further, but the example is from
the 0.99 era, so I suspect this behavior was changed with the
libification of the revision machinery and the reworking of git-diff.

Or maybe I just totally don't understand what '-r' is supposed to be
doing.

 Documentation/git-diff.txt |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 639b969..b1f5e7f 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -102,17 +102,14 @@ Limiting the diff output::
 +
 ------------
 $ git diff --diff-filter=MRC            <1>
-$ git diff --name-status -r             <2>
+$ git diff --name-status                <2>
 $ git diff arch/i386 include/asm-i386   <3>
 ------------
 +
 <1> show only modification, rename and copy, but not addition
 nor deletion.
 <2> show only names and the nature of change, but not actual
-diff output.  --name-status disables usual patch generation
-which in turn also disables recursive behavior, so without -r
-you would only see the directory name if there is a change in a
-file in a subdirectory.
+diff output.
 <3> limit diff output to named subtrees.
 
 Munging the diff output::
-- 
1.5.3.rc3.845.g88e3-dirty

             reply	other threads:[~2007-07-29  0:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-29  0:24 Jeff King [this message]
2007-07-29  2:06 ` [PATCH] Documentation/git-diff: remove -r from --name-status example Linus Torvalds
2007-07-29  4:11   ` Jeff King
2007-07-29  4:27     ` Linus Torvalds
2007-07-29  4:48       ` Junio C Hamano
2007-07-29  4:56         ` Jeff King
2007-07-29  8:23         ` David Kastrup
2007-07-29  9:36         ` Junio C Hamano
2007-07-29  9:49           ` Jeff King
2007-07-29 11:14             ` Johannes Schindelin
2007-07-29 11:33               ` David Kastrup
2007-07-29 11:38               ` Jeff King
2007-07-29 12:04                 ` Johannes Schindelin
2007-07-29 12:19                   ` Jeff King
2007-07-29 12:24                     ` Johannes Schindelin
2007-07-29 12:26                       ` Jeff King
2007-07-29 16:51         ` Linus Torvalds
2007-07-29  4:52       ` Jeff King

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=20070729002427.GA1566@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=jonsmirl@gmail.com \
    /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.
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 NNTP newsgroup(s).