Skip to content

Commit cdab165

Browse files
authored
Merge pull request libgit2#4490 from libgit2/ethomson/apfs_precompose_fixes
status::renames: test update for APFS (write NFD instead of NFC filename)
2 parents 895fd51 + 9af7fbc commit cdab165

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/status/renames.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,12 @@ static char *nfc = "\xC3\x85\x73\x74\x72\xC3\xB6\x6D";
590590
static char *nfd = "\x41\xCC\x8A\x73\x74\x72\x6F\xCC\x88\x6D";
591591
#endif
592592

593+
/*
594+
* Create a file in NFD (canonically decomposed) format. Ensure
595+
* that when core.precomposeunicode is false that we return paths
596+
* in NFD, but when core.precomposeunicode is true, then we
597+
* return paths precomposed (in NFC).
598+
*/
593599
void test_status_renames__precomposed_unicode_rename(void)
594600
{
595601
#ifdef GIT_USE_ICONV
@@ -610,7 +616,7 @@ void test_status_renames__precomposed_unicode_rename(void)
610616
{ GIT_STATUS_WT_RENAMED, "sixserving.txt", nfc },
611617
};
612618

613-
rename_file(g_repo, "sixserving.txt", nfc);
619+
rename_file(g_repo, "sixserving.txt", nfd);
614620

615621
opts.flags |= GIT_STATUS_OPT_INCLUDE_UNTRACKED;
616622

0 commit comments

Comments
 (0)