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

t7061: comments and one failure

From
Torsten Bögershausen <tboegi@web.de>
Date
Jan 5, 2013, 11:07 UTC
Message-ID
<50E8096C.7000501@web.de>
Hej,
TC 9 is failing (Mac OS X 10.6),
==========================
expecting success: 
        >tracked/uncommitted &&
        git status --porcelain --ignored >actual &&
        test_cmp expected actual

--- expected 2013-01-05 11:01:00.000000000 +0000 +++ actual 2013-01-05 11:01:00.000000000 +0000

@@ -1,4 +1,3 @@
 ?? .gitignore
 ?? actual
 ?? expected
-!! tracked/
not ok 9 - status ignored tracked directory and uncommitted file with --ignore
#       
#               >tracked/uncommitted &&
#               git status --porcelain --ignored >actual &&
#               test_cmp expected actual
#       
=======================
I haven't been able to dig further into this,
(I can volonteer to do some more debugging).
Looking into the code, there are 2 questions:

1) echo "ignored" >.gitignore &&
  We don't need the quoting of a simple string which does not have space in it.
2)  : >untracked/ignored &&
Do we need the colon here?

Would it make sence to do the following:


diff --git a/t/t7061-wtstatus-ignore.sh b/t/t7061-wtstatus-ignore.sh
index 0da1214..761a2e7 100755
--- a/t/t7061-wtstatus-ignore.sh
+++ b/t/t7061-wtstatus-ignore.sh
@@ -12,10 +12,10 @@ cat >expected <<\EOF
 EOF
 
 test_expect_success 'status untracked directory with --ignored' '
-	echo "ignored" >.gitignore &&
+	echo ignored >.gitignore &&
 	mkdir untracked &&
-	: >untracked/ignored &&
-	: >untracked/uncommitted &&
+	>untracked/ignored &&
+	>untracked/uncommitted &&
 	git status --porcelain --ignored >actual &&
 	test_cmp expected actual
 '
@@ -43,7 +43,7 @@ EOF
 test_expect_success 'status ignored directory with --ignore' '
 	rm -rf untracked &&
 	mkdir ignored &&
-	: >ignored/uncommitted &&
+	>ignored/uncommitted &&
 	git status --porcelain --ignored >actual &&
 	test_cmp expected actual
 '
@@ -71,8 +71,8 @@ test_expect_success 'status untracked directory with ignored files with --ignore
 	rm -rf ignored &&
 	mkdir untracked-ignored &&
 	mkdir untracked-ignored/test &&
-	: >untracked-ignored/ignored &&
-	: >untracked-ignored/test/ignored &&
+	>untracked-ignored/ignored &&
+	>untracked-ignored/test/ignored &&
 	git status --porcelain --ignored >actual &&
 	test_cmp expected actual
 '
@@ -99,10 +99,10 @@ EOF
 test_expect_success 'status ignored tracked directory with --ignore' '
 	rm -rf untracked-ignored &&
 	mkdir tracked &&
-	: >tracked/committed &&
+	>tracked/committed &&
 	git add tracked/committed &&
 	git commit -m. &&
-	echo "tracked" >.gitignore &&
+	echo tracked >.gitignore &&
 	git status --porcelain --ignored >actual &&
 	test_cmp expected actual
 '
@@ -126,7 +126,7 @@ cat >expected <<\EOF
 EOF
 
 test_expect_success 'status ignored tracked directory and uncommitted file with --ignore' '
-	: >tracked/uncommitted &&
+	>tracked/uncommitted &&
 	git status --porcelain --ignored >actual &&
 	test_cmp expected actual
 '


/Torsten
Next: Jeff King
Message 1 of 13 in “t7061: comments and one failure”
  1. Torsten BögershausenJan 5, 2013
  2. Jeff KingJan 5, 2013
  3. Antoine PelisseJan 5, 2013
  4. status: report ignored yet tracked directoriesAntoine Pelisse, Jan 5, 2013
  5. Torsten BögershausenJan 5, 2013
  6. Jeff KingJan 5, 2013
  7. Antoine PelisseJan 6, 2013
  8. Jeff KingJan 7, 2013
  9. status: always report ignored tracked directoriesAntoine Pelisse, Jan 6, 2013
  10. Torsten BögershausenJan 7, 2013
  11. Junio C HamanoJan 7, 2013
  12. Junio C HamanoJan 7, 2013
  13. Antoine PelisseJan 7, 2013

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.