From: Shumkin Alexey <zapped@mail.ru>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] post-receive-email: explicitly set Content-Type header
Date: Tue, 20 Sep 2011 14:42:56 +0400 [thread overview]
Message-ID: <20110920104256.GA11656@zapped.homeip.net> (raw)
In-Reply-To: <4E785DC6.80105@viscovery.net>
[ resent to mailing list ]
On Tue, Sep 20, 2011 at 11:32:54AM +0200, Johannes Sixt wrote:
> Am 9/20/2011 10:07, schrieb Alexey Shumkin:
> > Some email clients (e.g. claws-mail) incorrectly display
> > message body when there is no Content-Type header and charset
> > explicitly defined.
> > So, set explicitly Content-Type header and charset
> > can be defined with hooks.emailcharset config variable.
>
> Please write full sentences with complete punctuation and capitalization.
> Perhaps you meant to say:
>
> Some email clients (e.g. claws-mail) display the message body
> incorrectly when the charset is not defined explicitly in a
> Content-Type header. Insert a Content-Type header in the message.
>
> The charset can be defined with the config variable
> hooks.emailcharset.
Thanks for the correction. English is not my native language
(although it is not for you, too, I guess :) ).
I read it and take on ear fine but I have no enough practice to write on it.
> > +# hooks.emailcharset
> > +# The charset used in Content-Type header. UTF-8, if not
> > specified.
>
> How can you be sure that the output produced by git log etc. that are
> used in the script are in the encoding specified by this variable?
> IOW, wouldn't log.outputencoding be the better choice to use in the
> Content-Type header?
Yes, you're right, we cannot be sure in UTF-8 encoding of output
and using i18n.logoutputencoding would be a better choice
instead of new config variable.
But at the present
1. post-send-mail uses description file of a repo
2. gitweb also uses this file and AFAIK it assumes one to be in UTF-8
(I do not know whether it can be changed there but I tested gitweb once long
time ago)
3. So if i18n.logoutputencoding is not UTF-8 we get a message composed
with mixed encodings. This fact oblidge us to encode headers
(as quoted printable at least) and synchronize body message that contain
repo description (in UTF-8) and diffstat (in i18n.logoutputencoding).
This is a more complicated task for a shell script
than just specifying Content-Type header (may be git-send-email suits here?)
So that was a quick solution for me :)
next prev parent reply other threads:[~2011-09-20 10:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 7:52 [PATCH] post-receive-email: explicitly set Content-Type header Alexey Shumkin
2011-09-20 8:07 ` [PATCH v2] " Alexey Shumkin
2011-09-20 9:32 ` Johannes Sixt
2011-09-20 10:42 ` Shumkin Alexey [this message]
2011-09-20 11:10 ` Johannes Sixt
2011-10-07 9:06 ` Jonathan Nieder
2011-10-07 12:52 ` Alexey Shumkin
2011-10-07 20:19 ` Jonathan Nieder
2011-11-09 11:00 ` [PATCH v3] " Alexey Shumkin
2011-11-09 14:11 ` Junio C Hamano
2011-11-09 15:01 ` Alexey Shumkin
2011-09-20 12:23 ` [PATCH v2] " Jakub Narebski
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=20110920104256.GA11656@zapped.homeip.net \
--to=zapped@mail.ru \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
/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).