Re: Bug#553296: gitignore broken completely
- From
Jeff King <peff@peff.net>
- Date
- Oct 30, 2009, 20:05 UTC
- Message-ID
- <20091030200500.GA24831@coredump.intra.peff.net>
- In-Reply-To
- <20091030200148.GD10671@ikki.ethgen.de>
On Fri, Oct 30, 2009 at 09:01:48PM +0100, Klaus Ethgen wrote:
Show 14 quoted lines
> > +test_expect_success 'ls-files -i lists only tracked-but-ignored files' ' > > + echo content >other-file && > > + git add other-file && > > + echo file >expect && > > + git ls-files -i --exclude-standard >output && > > + test_cmp expect output > > +' > > + > > test_done > > Do that fit? shouldn't it be "test_cmp other-file output"? "git ls-files > -i --exclude-standard" should show the files in the index that are also > in the exclude list. And you only add other-file to the index. And > shouldn't there be also a "echo other-file > .gitignore"?
No, because it is building on the previous tests. The point of the test is:
- we already have 'file' tracked and in gitignore (from previous
tests in the series)
- we add other-file to have some other file which is tracked but not
in gitignore
- we check the output of "ls-files -i" to make sure that "file" is
there, but "other-file" is not-Peff