Re: git on MacOSX and files with decomposed utf-8 file names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:
diff --git a/t/t0060-normalization.sh b/t/t0060-normalization.sh
new file mode 100755
index 0000000..e012c02
--- /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.3




On Jan 24, 2008, at 12:39 AM, Steffen Prohaska wrote:


On Jan 24, 2008, at 6:30 AM, Kevin Ballard wrote:

On Jan 23, 2008, at 11:37 PM, Martin Langhoff wrote:

Kevin, other people have already started posting nice nuggets of test cases. Where are *your* test cases? That would be a nice way to "have
the last word" on this ;-)


I'm planning on devoting time this weekend to learning enough about git to be able to start hacking. I'm just too busy during the week to be able to devote the dedicated time necessary to this stuff. Hopefully I'll actually be able to start producing stuff this weekend.

You do not need to learn much about git to post a test case.
Only a few lines of shell code that demonstrate how git fails to
handle a specific situation is needed.  To do this, knowledge
about the internals of git does not necessary help.  It should be
sufficient to know how to use git.

You may start with a simple shell script and send it to the list.
Though, a real patch would be the preferred way.  For this, you
should have a quick look into the t/ subdirectory.  Just open any
of the tNUMBER*.sh files.  It should be quite obvious how your
sequence of shell commands could be cast into a git test script.

	Steffen
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux