From: Jeff King <peff@peff.net>
To: Teemu Likonen <tlikonen@iki.fi>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: "add -p" + filenames with UTF-8 multibyte characters = "No changes"
Date: Sun, 15 Feb 2009 22:36:34 -0500 [thread overview]
Message-ID: <20090216033634.GA12461@coredump.intra.peff.net> (raw)
In-Reply-To: <87prhjqzwb.fsf@iki.fi>
On Sun, Feb 15, 2009 at 09:11:00PM +0200, Teemu Likonen wrote:
> "core.quotepath=false" is good for other purposes too. It prints UTF-8
> filenames in diff headers in form that is actually readable. I think it
> would be better default.
I am not opposed to setting this as a default, but I think there may be
some encoding issues to be dealt with. At the very least, format-patch
generates messages without a content-type header. E.g.,:
$ touch föö && git add . && git commit -m one
$ echo content >föö && git commit -a -m two
$ git format-patch --stdout HEAD^ | sed '/^$/q'
vs
$ git config core.quotepath false
$ git format-patch --stdout HEAD^ | sed '/^$/q'
So now we have non-ascii in our email, but no header specifying
encoding. Previous experience has shown that intermediate MTAs (like
vger) will add their own header with whatever encoding they think is
sensible (in the case of vger, iso8859-1), corrupting the mail if they
guess wrong.
But what is the right encoding to specify? We can guess that it is
whatever the commit message is in (defaulting to utf-8). It is by no
means correct, but it would probably work pretty well in practice.
On the other hand, we already have the same problem for encoded file
_contents_. So maybe it is not a big problem in practice.
-Peff
next prev parent reply other threads:[~2009-02-16 3:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-15 18:40 "add -p" + filenames with UTF-8 multibyte characters = "No changes" Antonio García Domínguez
2009-02-15 18:59 ` Teemu Likonen
[not found] ` <2b8265360902151100n2eca0182odf9543c1dd8a7f98@mail.gmail.com>
2009-02-15 19:11 ` Teemu Likonen
2009-02-16 3:36 ` Jeff King [this message]
2009-02-16 4:00 ` Junio C Hamano
2009-02-17 7:02 ` [PATCH] git-add -i/-p: learn to unwrap C-quoted paths Junio C Hamano
2009-02-17 8:09 ` Teemu Likonen
2009-02-16 5:13 ` "add -p" + filenames with UTF-8 multibyte characters = "No changes" Teemu Likonen
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=20090216033634.GA12461@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tlikonen@iki.fi \
/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).