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

[PATCH 4/4] t0050: Add test for case insensitive add

From
Steffen Prohaska <prohaska@zib.de>
Date
May 11, 2008, 16:16 UTC
Message-ID
<1210522602-4724-4-git-send-email-prohaska@zib.de>
In-Reply-To
<1210522602-4724-3-git-send-email-prohaska@zib.de>

Add should recognize if a file is added with a different case and add the file using its original name.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 t/t0050-filesystem.sh |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index 399b45d..0e33c4b 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -77,6 +77,16 @@ $test_case 'merge (case change)' '
 
 '
 
+$test_case '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
+
+'
+
 test_expect_success "setup unicode normalization tests" '
 
   test_create_repo unicode &&
-- 
1.5.5.1.313.g9decb
Previous: Steffen ProhaskaNext: Linus Torvalds
Message 4 of 6 in “git-init: autodetect core.ignorecase”
  1. 1/4 git-init: autodetect core.ignorecaseSteffen Prohaska, May 11, 2008
  2. 2/4 t0050: Test autodetect core.ignorecaseSteffen Prohaska, May 11, 2008
  3. 3/4 t0050: Set core.ignorecase case to activate case insensitivitySteffen Prohaska, May 11, 2008
  4. 4/4 t0050: Add test for case insensitive addSteffen Prohaska, May 11, 2008
  5. Linus TorvaldsMay 11, 2008
  6. 0/4 core.ignorecaseSteffen Prohaska, May 11, 2008

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.