git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Klaus EthgenNext: Klaus Ethgen
Message 11 of 13 in “Re: Bug#553296: gitignore broken completely”
  1. Jeff KingOct 30, 2009
  2. Bug#553296: gitignore broken completelyKlaus Ethgen, Oct 30, 2009
  3. Jeff KingOct 30, 2009
  4. Jeff KingOct 30, 2009
  5. Junio C HamanoOct 30, 2009
  6. Jeff KingOct 30, 2009
  7. Klaus EthgenOct 30, 2009
  8. Junio C HamanoOct 30, 2009
  9. Jeff KingOct 30, 2009
  10. Klaus EthgenOct 30, 2009
  11. Jeff KingOct 30, 2009
  12. Klaus EthgenOct 30, 2009
  13. Junio C HamanoOct 30, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.