diff options
-rw-r--r-- | compat/precompose_utf8.c | 7 | ||||
-rwxr-xr-x | t/t0050-filesystem.sh | 1 | ||||
-rwxr-xr-x | t/t3910-mac-os-precompose.sh | 2 | ||||
-rwxr-xr-x | t/t7400-submodule-basic.sh | 1 |
4 files changed, 4 insertions, 7 deletions
diff --git a/compat/precompose_utf8.c b/compat/precompose_utf8.c index 7980abd1a7..95fe849e42 100644 --- a/compat/precompose_utf8.c +++ b/compat/precompose_utf8.c @@ -48,11 +48,8 @@ void probe_utf8_pathname_composition(char *path, int len) if (output_fd >= 0) { close(output_fd); strcpy(path + len, auml_nfd); - /* Indicate to the user, that we can configure it to true */ - if (!access(path, R_OK)) - git_config_set("core.precomposeunicode", "false"); - /* To be backward compatible, set precomposed_unicode to 0 */ - precomposed_unicode = 0; + precomposed_unicode = access(path, R_OK) ? 0 : 1; + git_config_set("core.precomposeunicode", precomposed_unicode ? "true" : "false"); strcpy(path + len, auml_nfc); if (unlink(path)) die_errno(_("failed to unlink '%s'"), path); diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh index 05d78d22a6..6b3cedcf24 100755 --- a/t/t0050-filesystem.sh +++ b/t/t0050-filesystem.sh @@ -91,6 +91,7 @@ test_expect_failure CASE_INSENSITIVE_FS 'add (with different case)' ' test_expect_success "setup unicode normalization tests" ' test_create_repo unicode && cd unicode && + git config core.precomposeunicode false && touch "$aumlcdiar" && git add "$aumlcdiar" && git commit -m initial && diff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh index 5fe57c5438..e4ba6013e4 100755 --- a/t/t3910-mac-os-precompose.sh +++ b/t/t3910-mac-os-precompose.sh @@ -36,7 +36,7 @@ Alongc=$Alongc$AEligatu$AEligatu #254 Byte test_expect_success "detect if nfd needed" ' precomposeunicode=`git config core.precomposeunicode` && - test "$precomposeunicode" = false && + test "$precomposeunicode" = true && git config core.precomposeunicode true ' test_expect_success "setup" ' diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index 5ee97b003a..f0f8cde434 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -958,7 +958,6 @@ test_expect_success 'submodule with UTF-8 name' ' git add sub && git commit -m "init sub" ) && - test_config core.precomposeunicode true && git submodule add ./"$svname" && git submodule >&2 && test -n "$(git submodule | grep "$svname")" |