Re: refining .gitignores

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bruce Stephens
Date: Thursday, November 15, 2007 - 4:39 am

Alex Riesen <raa.lkml@gmail.com> writes:


That doesn't seem to work.

For example, if I add '*.c' to .gitignores in git.git, I can't seem to
get that command to display any .c files.

Run on its own, it displays lots of files, but no .c files.  Run with
an argument (such as builtin-add.c), it displays nothing.


That also doesn't seem to do quite what I want, and probably in the
same way.  I see git add returns non-zero error status if a file is
ignored, so I can do it with

excluded=()
for f in $(git ls-files)
do
    git add $f || excluded=($excluded $f)
done

But that feels kind of clunky.  I feel I'm missing something basic
about how git ls-files is intended to work, or something.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
refining .gitignores, Bruce Stephens, (Wed Nov 14, 3:36 pm)
Re: refining .gitignores, Alex Riesen, (Wed Nov 14, 4:02 pm)
Re: refining .gitignores, Bruce Stephens, (Thu Nov 15, 4:39 am)
Re: refining .gitignores, Alex Riesen, (Thu Nov 15, 12:26 pm)
Re: refining .gitignores, Bruce Stephens, (Thu Nov 15, 1:28 pm)
Re: refining .gitignores, Linus Torvalds, (Thu Nov 15, 1:40 pm)
Re: refining .gitignores, Bruce Stephens, (Thu Nov 15, 2:13 pm)
Re: refining .gitignores, Alex Riesen, (Thu Nov 15, 2:17 pm)
Re: refining .gitignores, Linus Torvalds, (Thu Nov 15, 2:56 pm)