git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC][PATCH v2] git on Mac OS and precomposed unicode

From
Torsten Bögershausen <tboegi@web.de>
Date
Jan 13, 2012, 21:52 UTC
Message-ID
<4F10A7AE.6030004@web.de>
In-Reply-To
<7vd3asejrr.fsf@alter.siamese.dyndns.org>
On 01/09/2012 08:52 PM, Junio C Hamano wrote:
[snip]
 >probe_utf8_pathname_composition(path, len);
Done
[snip]
 >and implementation of the function body in compat/darwin.c (Didn't I see a
 >comment on the name of this file, by the way? What was the conclusion of
 > the discussion?).
I renamed the compat/darwin.[ch] into compat/precomposed_utf8.[ch]
Show 13 quoted lines
>> +{
>> +	int i = 0;
>> +	int first_arg = 0; /* convert everything */
>> +	const char *oldarg;
>> +	char *newarg;
>> +	iconv_t ic_precompose;
>> +
>> +	git_config(precomposed_unicode_config, NULL);
>
> Hmmmmm.  Is it safe to call git_config() this early in the program?  Have
> we determined if we are in a git managed repository and where its $GIT_DIR
> is?
>

According to my understanding, yes: git_config is called with the custom function precomposed_unicode_config():

git_config(precomposed_unicode_config, NULL);
where
  precomposed_unicode_config()

fishes for the config variable "core.precomposedunicode" and puts the result into int precomposed_unicode_config.

After that, when precomposed_unicode_config==0, argv_precomposed() will return.

  I'll send the V3 RFC/PATCH
/Torsten
Previous: Junio C Hamano
Message 3 of 3 in “git on Mac OS and precomposed unicode”
  1. Torsten BögershausenJan 9, 2012
  2. Junio C HamanoJan 9, 2012
  3. Torsten BögershausenJan 13, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.