All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: Bruce Stephens <bruce.stephens@isode.com>
Cc: git@vger.kernel.org
Subject: Re: refining .gitignores
Date: Thu, 15 Nov 2007 00:02:58 +0100	[thread overview]
Message-ID: <20071114230258.GG3973@steel.home> (raw)
In-Reply-To: <804pfobgkp.fsf@tiny.isode.net>

Bruce Stephens, Wed, Nov 14, 2007 23:36:06 +0100:
> How do I get a list of files (in HEAD, say) that would be ignored by
> the .gitignore files (and the other usual settings)?
> 
> It feels like something like this ought to work:
> 
>      git ls-files -z | xargs -0 git ls-files --ignored
> 
> But listing its arguments that are ignored by .gitignore (etc.)
> doesn't seem to be what "git ls-files --ignored" does.  Or at least,
> not quite as straightforwardly as that.

git ls-files --exclude-per-directory=.gitignore -X .git/info/exclude -i -o

> The motivation is (obviously) that I fear some of the .gitignore
> patterns are too broad, and a reasonable check is that none of the
> files that are already committed would be caught by the patterns.

git ls-files --exclude-per-directory=.gitignore -X .git/info/exclude -i

(IOW, remove the -o aka --others)

  reply	other threads:[~2007-11-14 23:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-14 22:36 refining .gitignores Bruce Stephens
2007-11-14 23:02 ` Alex Riesen [this message]
2007-11-15 11:39   ` Bruce Stephens
2007-11-15 19:26     ` Alex Riesen
2007-11-15 20:28       ` Bruce Stephens
2007-11-15 20:40         ` Linus Torvalds
2007-11-15 21:13           ` Bruce Stephens
2007-11-15 21:17         ` Alex Riesen
2007-11-15 21:56           ` Linus Torvalds

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=20071114230258.GG3973@steel.home \
    --to=raa.lkml@gmail.com \
    --cc=bruce.stephens@isode.com \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.