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

[PATCH] Demonstrate failure of 'core.ignorecase = true'

From
Peter J. Weisberg <pj@irregularexpressions.net>
Date
Mar 21, 2012, 22:50 UTC
Message-ID
<1332370222-5123-1-git-send-email-pj@irregularexpressions.net>
From: "Peter J. Weisberg" <pj@irregularexpressions.net>
On a filesystem that *is* case-sensitive, renaming a file to a name
that would be equivalent on a case-insensitive filesystem makes Git
think the original file was deleted.  Add a test that demonstrates
this as a known error.
---
I have a repository that contains files that I sync from a place where
names are case-insensitive.  When I sync a file that has a change in
the case of the file name, I want Git to ignore that non-change.  I
would think core.ignorecase would accomplish this, but it does not.
---
 t/t2000-ignorecase-config.sh |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100755 t/t2000-ignorecase-config.sh
diff --git a/t/t2000-ignorecase-config.sh b/t/t2000-ignorecase-config.sh
new file mode 100755
index 0000000..9d05cee
--- /dev/null
+++ b/t/t2000-ignorecase-config.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# Copyright (c) 2012 Peter J Weisberg
+#
+
+test_description='core.ignorecase'
+
+. ./test-lib.sh
+
+test_expect_failure "diff-files doesn't show case change when ignorecase=true" '
+	git config core.ignorecase true &&
+
+	touch foo &&
+	git add foo &&
+	git commit -m "foo" &&
+	mv foo FOO &&
+
+	test -z "$(git diff-files)"
+'
+
+test_done
-- 
1.7.9.1
Next: Junio C Hamano
Message 1 of 23 in “Demonstrate failure of 'core.ignorecase = true'”
  1. Demonstrate failure of 'core.ignorecase = true'Peter J. Weisberg, Mar 21, 2012
  2. Junio C HamanoMar 21, 2012
  3. PJ WeisbergMar 22, 2012
  4. Junio C HamanoMar 22, 2012
  5. Thomas RastMar 23, 2012
  6. Junio C HamanoMar 23, 2012
  7. Jeff KingMar 23, 2012
  8. Jeff KingMar 23, 2012
  9. Johannes SixtMar 22, 2012
  10. Zbigniew Jędrzejewski-SzmekMar 22, 2012
  11. Jeff KingMar 22, 2012
  12. Junio C HamanoMar 22, 2012
  13. Jeff KingMar 22, 2012
  14. Junio C HamanoMar 22, 2012
  15. Jeff KingMar 22, 2012
  16. Junio C HamanoMar 22, 2012
  17. Zbigniew Jędrzejewski-SzmekMar 22, 2012
  18. Junio C HamanoMar 22, 2012
  19. Zbigniew Jędrzejewski-SzmekMar 22, 2012
  20. PJ WeisbergMar 22, 2012
  21. Junio C HamanoMar 22, 2012
  22. Jeff KingMar 22, 2012
  23. Junio C HamanoMar 22, 2012

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.