* Behavior of git ls-files
@ 2011-03-04 17:38 Steffen Jaeckel
2011-03-05 8:47 ` Clemens Buchacher
0 siblings, 1 reply; 2+ messages in thread
From: Steffen Jaeckel @ 2011-03-04 17:38 UTC (permalink / raw)
To: git
Hi,
I want to list all files in a repository that are tracked, but shall be ignored
when following the patterns in .gitignore
I tried to do this by "git ls-files --exclude-standard -i" but it seems as if it
doesn't properly handle directory entries in .gitignore
The following example shall reproduce this issue:
> $ mkdir test
> $ cd test
> $ git init
> $ mkdir testdir
> $ touch testdir/test
> $ git add testdir/test
> $ git commit -m "add test"
> $ echo "testdir/" > .gitignore
> $ git ls-files --exclude-standard -i
Is the behavior of git ls-files correct or not?
Thanks,
Steffen
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Behavior of git ls-files
2011-03-04 17:38 Behavior of git ls-files Steffen Jaeckel
@ 2011-03-05 8:47 ` Clemens Buchacher
0 siblings, 0 replies; 2+ messages in thread
From: Clemens Buchacher @ 2011-03-05 8:47 UTC (permalink / raw)
To: Steffen Jaeckel; +Cc: git
On Fri, Mar 04, 2011 at 06:38:31PM +0100, Steffen Jaeckel wrote:
>
> Is the behavior of git ls-files correct or not?
Indeed, the behavior is not correct. It does not find any files
which are excluded only due to a directory exclude.
In the cases without -i we do not even have to look at files under
an ignored directory. So the matching rules are not applied
correctly in this case.
We have the same problem with git ls-files -i -o, unless you also
specify --directory (in which case, again, we do not need to look
at files under the ignored directory).
Clemens
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-05 9:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-04 17:38 Behavior of git ls-files Steffen Jaeckel
2011-03-05 8:47 ` Clemens Buchacher
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).