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

[PATCH 1/3] t0050: mark non-working test as such

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 1, 2010, 08:26 UTC
Message-ID
<7veik45ty9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7v8wachgek.fsf_-_@alter.siamese.dyndns.org>

The test is to prepare an empty file "camelcase" in the index, remove and replace it with another file "CamelCase" with "1" as its contents in the working tree, and add it to the index, in a repository configured to be case insensitive.

However, the test actually checked ls-files knows about a pathname that matches "camelcase" case insensitively. It didn't check if the added contents actually was the updated one.

Mark the test as non-working.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 * This comes from 8a19aaa (t0050: Add test for case insensitive add,
   2008-05-11); back then the code did add both camelcase and CamelCase,
   and somewhere after that we once fixed it, but 1e5f764 (builtin-add.c:
   optimize -A option and "git add .", 2008-07-22) broke it in a different
   way (namely, it stopped adding the updated contents); I am not going to
   have time to debug it further anytime soon (hint hint)...
 t/t0050-filesystem.sh |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index 89282cc..41df6bc 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -108,13 +108,17 @@ $test_case 'merge (case change)' '
 
 '
 
-$test_case 'add (with different case)' '
+
+
+test_expect_failure 'add (with different case)' '
 
 	git reset --hard initial &&
 	rm camelcase &&
 	echo 1 >CamelCase &&
 	git add CamelCase &&
-	test $(git ls-files | grep -i camelcase | wc -l) = 1
+	camel=$(git ls-files | grep -i camelcase) &&
+	test $(echo "$camel" | wc -l) = 1 &&
+	test "z$(git cat-file blob :$camel)" = z1
 
 '
 
-- 
1.7.0.1.241.g6604f
Previous: Junio C HamanoNext: Jeff King
Message 10 of 17 in “'git add' regression in git-1.7?”
  1. SungHyun NamFeb 19, 2010
  2. Avery PennarunFeb 19, 2010
  3. SungHyun NamFeb 19, 2010
  4. Avery PennarunFeb 19, 2010
  5. Jeff KingFeb 19, 2010
  6. Jeff KingFeb 19, 2010
  7. Jeff KingFeb 19, 2010
  8. Junio C HamanoMar 1, 2010
  9. add: fail "git add ignored-dir/file" without -fJunio C Hamano, Mar 1, 2010
  10. 1/3 t0050: mark non-working test as suchJunio C Hamano, Mar 1, 2010
  11. Jeff KingMar 9, 2010
  12. Jeff KingMar 9, 2010
  13. Junio C HamanoMar 10, 2010
  14. Jeff KingMar 11, 2010
  15. Junio C HamanoMar 14, 2010
  16. Jeff KingMar 14, 2010
  17. Junio C HamanoMar 15, 2010

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.