From: Alex Riesen <raa.lkml@gmail.com>
To: Bruce Stephens <bruce.stephens@isode.com>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: refining .gitignores
Date: Thu, 15 Nov 2007 22:17:27 +0100 [thread overview]
Message-ID: <20071115211727.GC3552@steel.home> (raw)
In-Reply-To: <80ejerdzjd.fsf@tiny.isode.net>
Bruce Stephens, Thu, Nov 15, 2007 21:28:06 +0100:
> Alex Riesen <raa.lkml@gmail.com> writes:
>
> [...]
>
> > .gitignore? Without "s"?
>
> Yes, my mistake. I added '*.c' to ".gitignore".
>
> > Maybe your .c files are already added to index? Otherwise you have to
> > use the second form. It shows known-to-Git ignored files.
>
> They are in the index. What I want is a list of files which are known
> to git, which are matched by the default rules (in particular the
> .gitignore files).
>
> So that should be this?
>
> git ls-files --exclude-per-directory=.gitignore -i
Yes, so it seems. The per-directory ignore-files don't work.
"--exclude-from=" (aka -X) still does.
> But that shows nothing at all, and it still shows nothing if I add a
> "builtin-add.c" as an argument to it (this file exists, and is in the
> index).
>
> "git add builtin-add.c" fails, complaining (correctly) that the path
> is ignored by one of my .gitignore files.
>
> We're obviously talking past one another somehow, or I have a broken
> build of git?
No, I honestly believed that Git-known files can be ignored. According
to Linus I must be wrong, but I have an excuse:
$ mkdir aaa
$ cd aaa
$ git init
Initialized empty Git repository in .git/
$ uname >abc
$ git add .
$ ls > .gitignore
$ git ls-files -X .gitignore
$ git ls-files -X .gitignore -i
abc
next prev parent reply other threads:[~2007-11-15 21:17 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
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 [this message]
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=20071115211727.GC3552@steel.home \
--to=raa.lkml@gmail.com \
--cc=bruce.stephens@isode.com \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.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.