All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Torsten Bögershausen" <tboegi@web.de>,
	git@vger.kernel.org
Subject: Re: [RFC] i18n.pathencoding
Date: Wed, 05 Sep 2012 21:49:59 +0200	[thread overview]
Message-ID: <5047ACE7.3050000@web.de> (raw)
In-Reply-To: <CACsJy8ARmPwELFhdvu_Y2kZNbYNgTzoqLzriH2oB7WtxM8D7hg@mail.gmail.com>

On 05.09.12 13:11, Nguyen Thai Ngoc Duy wrote:
> On Wed, Sep 5, 2012 at 12:19 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>>> On Sat, Sep 1, 2012 at 1:11 PM, Torsten Bögershausen <tboegi@web.de> wrote:
>>>> @@ -476,7 +476,7 @@ int parse_options(int argc, const char **argv, const char *prefix,
>>>>                 usage_with_options(usagestr, options);
>>>>         }
>>>>
>>>> -       precompose_argv(argc, argv);
>>>> +       reencode_argv(argc, argv);
>>>>         return parse_options_end(&ctx);
>>>>  }
>>>
>>> If you have to re-encode command line arguments, what about paths
>>> coming --stdin or a file?
>>
>> That problem is inherited from the MacOS precompose topic this one
>> builds on.  Not that it is unimportant to fix, though.
> 
> On fixing that. 76759c7 describes the change as:
> 
>     The argv[] conversion allows to use the TAB filename completion done
>     by the shell on command line.  It tolerates other tools which use
>     readdir() to feed decomposed file names into git.
> 
> How come git's internal conversion helps TAB filename completion,
> which is done before git is executed?

Because the shell use readdir() itself when <TAB> is pressed

$echo Bö > Bö
$echo Ba > Ba
$ls 
Bo ̈
Ba

# The terminal program of Mac OS shows the decomposed "ö" correctly,
"Bö" is shown as "Bö", while xterm shows "Bö" as "Bo ̈",
that is "o" followod by a "combining diaresis".

The shell seems to do the same:
to add Bö to git,

$git add Bo<TAB>

needs to be used.
And as a result, the sheel will pass the "o" in decomposed unicode to git,
which is corrected in precompose_argv().

  reply	other threads:[~2012-09-05 19:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-01  6:11 [RFC] i18n.pathencoding Torsten Bögershausen
2012-09-02 22:59 ` Robin Rosenberg
2012-09-08 10:09   ` Torsten Bögershausen
2012-09-04 12:23 ` Nguyen Thai Ngoc Duy
2012-09-04 17:19   ` Junio C Hamano
2012-09-04 19:51     ` Torsten Bögershausen
2012-09-04 20:12       ` Junio C Hamano
2012-09-05 19:52         ` Torsten Bögershausen
2012-09-05 11:11     ` Nguyen Thai Ngoc Duy
2012-09-05 19:49       ` Torsten Bögershausen [this message]
2012-09-06  3:24         ` Junio C Hamano

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=5047ACE7.3050000@web.de \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.