git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Dmitry Potapov <dpotapov@gmail.com>, Jeff King <peff@peff.net>,
	git@vger.kernel.org
Subject: Re: How to exclude files from "git diff"
Date: Wed, 6 Jan 2010 01:31:24 +0700	[thread overview]
Message-ID: <fcaeb9bf1001051031j6723dc14v8d43944e3b8baa90@mail.gmail.com> (raw)
In-Reply-To: <6dc9ffc81001051015x3bebc994r3d475bdb59e12d39@mail.gmail.com>

On 1/6/10, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Jan 5, 2010 at 9:54 AM, Dmitry Potapov <dpotapov@gmail.com> wrote:
>  > On Tue, Jan 5, 2010 at 5:20 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>  >>
>  >> Yes, I want those files in repository. They are for my personal use only.
>  >
>  > If you modified some file locally and do not want to see and commit
>  > those modifications, you may want to use:
>  >
>  > git update-index --assume-unchanged foo
>  >
>
>
> I added those files into my repository for bookkeeping purpose. It
>  shouldn't go out at all.

That could be a way to simulate git diff --exclude="foo*.bar*":

git ls-files -- 'foo*bar*'|xargs git update-index --assume-unchanged
git diff
git ls-files -- 'foo*bar*'|xargs git update-index --no-assume-unchanged

assume that you don't use assume-unchanged for any other purposes
-- 
Duy

  reply	other threads:[~2010-01-05 18:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18 17:09 How to exclude files from "git diff" H.J. Lu
2010-01-05  6:45 ` Jeff King
2010-01-05 14:20   ` H.J. Lu
2010-01-05 17:54     ` Dmitry Potapov
2010-01-05 18:15       ` H.J. Lu
2010-01-05 18:31         ` Nguyen Thai Ngoc Duy [this message]
2010-01-05 18:41         ` Junio C Hamano

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=fcaeb9bf1001051031j6723dc14v8d43944e3b8baa90@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hjl.tools@gmail.com \
    --cc=peff@peff.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.
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).