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

Add case-challenged file system tests

From
Steffen Prohaska <prohaska@zib.de>
Date
Feb 8, 2008, 07:09 UTC
Message-ID
<12024545763364-git-send-email-prohaska@zib.de>

There have been discussions lately on case-challenging file systems and UTF normalization on Mac OS X. I like to see these problems fixed and would like to start working on a resolution. But I did not follow the recent discussions closely.

Is anyone actively orking on these issues? What is the current status?

The patch below adds two simple tests that currently fail on Mac and Windows. I also collected Mitch's test on utf-8 and will send it as a reply to this mail. These two patches contain test cases that should pass, but do currently fail.

    Steffen

-- >8 -- Git behaves strangely (from a user's point of view) on filesystems that preserve case but do not distinguish filenames that only differ by case. The two major examples are Windows and Mac OS X. Simple operations such as "git mv" or "git merge" can fail unexpectedly.

This commit adds two simple tests. Both tests currently fail on Windows and Mac, although they pass on Linux.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 t/t0050-filesystems.sh |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
 create mode 100755 t/t0050-filesystems.sh
diff --git a/t/t0050-filesystems.sh b/t/t0050-filesystems.sh
new file mode 100755
index 0000000..953b02b
--- /dev/null
+++ b/t/t0050-filesystems.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+test_description='Various filesystems issues'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+
+	touch camelcase &&
+	git add camelcase &&
+	git commit -m "initial" &&
+	git tag initial &&
+	git checkout -b topic &&
+	git mv camelcase tmp &&
+	git mv tmp CamelCase &&
+	git commit -m "rename" &&
+	git checkout -f master
+
+'
+
+test_expect_success 'rename (case change)' '
+
+	git mv camelcase CamelCase &&
+	git commit -m "rename"
+
+'
+
+test_expect_success 'merge (case change)' '
+
+	git reset --hard initial &&
+	git merge topic
+
+'
+
+
+test_done
-- 
1.5.4.40.g4a680
Next: Steffen Prohaska
Message 1 of 7 in “Add case-challenged file system tests”
  1. Steffen ProhaskaFeb 8, 2008
  2. [WIP] git on MacOSX and files with decomposed utf-8 file namesSteffen Prohaska, Feb 8, 2008
  3. Junio C HamanoFeb 8, 2008
  4. Add tests for filesystem challenges (case and unicode normalization)Steffen Prohaska, Feb 24, 2008
  5. Junio C HamanoFeb 25, 2008
  6. Steffen ProhaskaFeb 25, 2008
  7. Junio C HamanoFeb 26, 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.