Thread (3 messages) 3 messages, 2 authors, 2016-06-15

Re: Bug#553296: gitignore broken completely

flat view

From: Jeff King <hidden>
Date: 2016-06-15 22:47:38

On Fri, Oct 30, 2009 at 09:01:48PM +0100, Klaus Ethgen wrote:
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help