git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: git@vger.kernel.org
Subject: Re: [RFC][PATCH v2] git on Mac OS and precomposed unicode
Date: Mon, 09 Jan 2012 11:52:08 -0800	[thread overview]
Message-ID: <7vd3asejrr.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <201201091745.30415.tboegi@web.de> ("Torsten Bögershausen"'s message of "Mon, 9 Jan 2012 17:45:29 +0100")

Torsten Bögershausen <tboegi@web.de> 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?

  reply	other threads:[~2012-01-09 19:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09 16:45 [RFC][PATCH v2] git on Mac OS and precomposed unicode Torsten Bögershausen
2012-01-09 19:52 ` Junio C Hamano [this message]
2012-01-13 21:52   ` Torsten Bögershausen
  -- strict thread matches above, loose matches on Subject: below --
2012-01-09 16:45 Torsten Bögershausen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vd3asejrr.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).