summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-09-17 11:39:59 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-09-17 11:39:59 -0700
commitf2ded0f807da72d2bac8cdb7f332a91f5ea5ee72 (patch)
tree67820bf44cea87bdb5f21e5a3dcb9b0bc1184b07 /compat
parentMerge branch 'kk/tests-with-no-perl' (diff)
parentSet core.precomposeunicode to true on e.g. HFS+ (diff)
downloadtgif-f2ded0f807da72d2bac8cdb7f332a91f5ea5ee72.tar.xz
Merge branch 'tb/precompose-autodetect-fix'
On MacOS X, we detected if the filesystem needs the "pre-composed unicode strings" workaround, but did not automatically enable it. Now we do. * tb/precompose-autodetect-fix: Set core.precomposeunicode to true on e.g. HFS+
Diffstat (limited to 'compat')
-rw-r--r--compat/precompose_utf8.c7
1 files changed, 2 insertions, 5 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);