From 92b0c8bed0d3f6ed5442e3ffa178413772faa31b Mon Sep 17 00:00:00 2001 From: Torsten Bögershausen Date: Tue, 27 Aug 2013 15:50:40 +0200 Subject: Set core.precomposeunicode to true on e.g. HFS+ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When core.precomposeunicode was introduced in 76759c7d, it was set to false on a unicode decomposing file system like HFS+ to be compatible with older versions of Git. The Mac OS users need to find out that this configuration exist and change it manually from false to true. A smoother workflow can be achieved, so set core.precomposeunicode to true on a decomposing file system. Signed-off-by: Torsten Bögershausen Signed-off-by: Junio C Hamano --- compat/precompose_utf8.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'compat/precompose_utf8.c') 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); -- cgit v1.3