Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-16

Re: git diff does not precompose unicode file paths (OS X)

From: Torsten Bögershausen <hidden>
Date: 2016-06-15 23:08:44

 >I created a test case but git diff exits with 0 if it does not recognize the 
file >path so the test case always succeeds. Can you give me a hint or one 
 >example test case?

The most clean (?) is to compare "git diff" NFC and git diff NFD, they should 
give the same result:
for "git diff" something like this would do:
+
+# This will test git diff
+test_expect_success "git diff f.Adiar" '
+       echo "Modified" >f.$Adiarnfd &&
+       git diff f.$Adiarnfd >expect &&
+       git diff f.$Adiarnfc >actual &&
+       git checkout f.$Adiarnfd &&
+       test_cmp expect actual
+'

HTH
/Torsten
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help