Git development
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Bert Wesarg <bert.wesarg@googlemail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: diff for deleted file only, when changed to directory
Date: Wed, 8 Dec 2010 02:21:03 -0600	[thread overview]
Message-ID: <20101208082103.GA4927@burratino> (raw)
In-Reply-To: <AANLkTimXOKC_9TJU1foNkTqPHouFPouzZw3XU_9Za=na@mail.gmail.com>

Bert Wesarg wrote:

>                                                                git
> diff --cached -- foo shows me the diff for both the file foo and file
> foo/bar.
[...]
>                                              But for the case
> file->directory, I would like to see only the deleted diff, not
> recursing into the directory.

If I understand correctly, this is a documentation bug and feature
request.

The documentation bug: the "git diff" documentation says something
like

	git diff [--options] [<tree>[..<tree>]] [--] [<path>...]

but the <path>s after "--" are actually patterns (path specifiers).
See [1] ([RFD] git glossary: define pathspec, 2010-11-29).

The feature request: there is no way to specify an "exact match"
or "negative match" when specifying paths.  At least "negative
match" has been suggested before.

[1] http://thread.gmane.org/gmane.comp.version-control.git/162379

  reply	other threads:[~2010-12-08  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08  8:12 diff for deleted file only, when changed to directory Bert Wesarg
2010-12-08  8:21 ` Jonathan Nieder [this message]
2010-12-08  9:29   ` Bert Wesarg
2010-12-08  9:56     ` Nguyen Thai Ngoc Duy

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=20101208082103.GA4927@burratino \
    --to=jrnieder@gmail.com \
    --cc=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@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