Add case-challenged file system tests

Subsystems: the rest

2 messages, 1 author, 2016-06-15 · open the first message on its own page

Add case-challenged file system tests

From: Steffen Prohaska <hidden>
Date: 2016-06-15 22:44:11

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 <redacted>
---
 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

[PATCH] [WIP] git on MacOSX and files with decomposed utf-8 file names

From: Steffen Prohaska <hidden>
Date: 2016-06-15 22:44:11

From: Mitch Tishmack <redacted>

[ spr: This patch contains Mitch's work with his original email
       as the commit message. ]

Apologies Steffen, I grabbed your CamelCase test and did a search/replace,
wasn't sure what to call it though... But I am on lunch and wanted to be
useful. Rip it apart all you want.

Fails on hfs* on OSX, works on ufs. I will bother with zfs when it can be used
again.

On UFS:
$ /bin/sh ./t0060-normalization.sh
*   ok 1: setup
*   ok 2: rename (silent normalization)
*   ok 3: merge (silent normalization)
* passed all 3 test(s)

On HFS:
$ /bin/sh t0060-normalization.sh
*   ok 1: setup
* FAIL 2: rename (silent normalization)

     git mv ä ä &&
     git commit -m "rename"

* FAIL 3: merge (silent normalization)

     git reset --hard initial &&
     git merge topic

* failed 2 among 3 test(s)

The test case, it uses perl, assuming only 5.6.1+ will work with this:

Signed-off-by: Steffen Prohaska <redacted>
---
 t/t0060-normalization.sh |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
 create mode 100755 t/t0060-normalization.sh
diff --git a/t/t0060-normalization.sh b/t/t0060-normalization.sh
new file mode 100755
index 0000000..f754fe4
--- /dev/null
+++ b/t/t0060-normalization.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+test_description='Test for silent normalization issues'
+
+. ./test-lib.sh
+
+auml=`perl -CO -e 'print pack("U",0x00E4)'`
+aumlcdiar=`perl -CO -e 'print pack("U",0x0061).pack("U",0x0308)'`
+test_expect_success setup "
+  touch $aumlcdiar &&
+  git add $aumlcdiar &&
+  git commit -m \"initial\"
+  git tag initial &&
+  git checkout -b topic &&
+  git mv $aumlcdiar tmp &&
+  git mv tmp $auml &&
+  git commit -m \"rename\" &&
+  git checkout -f master
+
+"
+
+test_expect_success 'rename (silent normalization)' "
+
+ git mv $aumlcdiar $auml &&
+ git commit -m \"rename\"
+
+"
+
+test_expect_success 'merge (silent normalization)' '
+
+ git reset --hard initial &&
+ git merge topic
+
+'
+
+test_done
-- 
1.5.4.40.g4a680
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help