summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-09-17 18:39:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-09-17 18:39:59 (GMT)
commitf2ded0f807da72d2bac8cdb7f332a91f5ea5ee72 (patch)
tree67820bf44cea87bdb5f21e5a3dcb9b0bc1184b07 /compat
parent22a6f313333d41dad0030ec07cdededbdd007a72 (diff)
parent92b0c8bed0d3f6ed5442e3ffa178413772faa31b (diff)
downloadgit-f2ded0f807da72d2bac8cdb7f332a91f5ea5ee72.zip
git-f2ded0f807da72d2bac8cdb7f332a91f5ea5ee72.tar.gz
git-f2ded0f807da72d2bac8cdb7f332a91f5ea5ee72.tar.bz2
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 7980abd..95fe849 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);