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

[PATCH v1 1/1] test: Correct detection of UTF8_NFD_TO_NFC for APFS

From
tboegi@web.de <tboegi@web.de>
Date
Apr 30, 2018, 06:35 UTC
Message-ID
<20180430063519.27122-1-tboegi@web.de>
In-Reply-To
<CABPp-BHitvta8we8di-tFiNdVV7vXnMNAhiAs2=CrQc-gGuSJw@mail.gmail.com>
From: Torsten Bögershausen <tboegi@web.de>

On HFS (which is the default Mac filesystem prior to High Sierra), unicode names are "decomposed" before recording. On APFS, which appears to be the new default filesystem in Mac OS High Sierra, filenames are recorded as specified by the user.

APFS continues to allow the user to access it via any name that normalizes to the same thing.

This difference causes t0050-filesystem.sh to fail two tests.

Improve the test for a NFD/NFC in test-lib.sh: Test if the same file can be reached in pre- and decomposed unicode.

Reported-By: Elijah Newren <newren@gmail.com>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 t/test-lib.sh | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index ea2bbaaa7a..e206250d1b 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1106,12 +1106,7 @@ test_lazy_prereq UTF8_NFD_TO_NFC '
 	auml=$(printf "\303\244")
 	aumlcdiar=$(printf "\141\314\210")
 	>"$auml" &&
-	case "$(echo *)" in
-	"$aumlcdiar")
-		true ;;
-	*)
-		false ;;
-	esac
+	test -r "$aumlcdiar"
 '
 
 test_lazy_prereq AUTOIDENT '
-- 
2.16.0.rc0.8.g5497051b43
Previous: Elijah NewrenNext: Junio C Hamano
Message 6 of 11 in “BUG report: unicode normalization on APFS (Mac OS High Sierra)”
  1. Elijah NewrenApr 26, 2018
  2. Torsten BögershausenApr 26, 2018
  3. Elijah NewrenApr 26, 2018
  4. Totsten BögershausenApr 27, 2018
  5. Elijah NewrenApr 30, 2018
  6. 1/1 test: Correct detection of UTF8_NFD_TO_NFC for APFStboegi@web.de, Apr 30, 2018
  7. Junio C HamanoApr 30, 2018
  8. Torsten BögershausenApr 30, 2018
  9. Elijah NewrenApr 30, 2018
  10. Torsten BögershausenApr 30, 2018
  11. Elijah NewrenApr 30, 2018

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.