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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Torsten Bögershausen <tboegi@xxxxxx> writes:

> diff --git a/builtin/init-db.c b/builtin/init-db.c
> index 0dacb8b..88c9de1 100644
> --- a/builtin/init-db.c
> +++ b/builtin/init-db.c
> @@ -290,6 +290,28 @@ static int create_default_files(const char *template_path)
>  		strcpy(path + len, "CoNfIg");
>  		if (!access(path, F_OK))
>  			git_config_set("core.ignorecase", "true");
> +#if defined (PRECOMPOSED_UNICODE)
> +		{
> +...
> +#endif

I'd prefer just a single, unconditional call here:

		probe_utf8_pathname_composition(path, len);

with something like this at the top of the file:

	#ifndef PRECOMPOSED_UNICODE
	#define probe_utf8_pathname_composition(a,b) /* nothing */
        #else
        void probe_utf8_pathname_composition(char *, int);
	#endif

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?).

> +void
> +argv_precompose(int argc, const char **argv)

Style.

> +{
> +	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?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]