git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Problem with "From:" line on "git format-patch" generated patches

From
SBSanti Béjar <santi@agolina.net>
Date
Nov 3, 2009, 17:02 UTC
Message-ID
<adf1fd3d0911030902x15faffcen86644733ffda43d5@mail.gmail.com>
In-Reply-To
<b8bf37780911030830l42ea6dc2v3ef66e2a9e1ca281@mail.gmail.com>

On Tue, Nov 3, 2009 at 5:30 PM, André Goddard Rosa <andre.goddard@gmail.com> wrote:

Show 28 quoted lines
> Hi, everybody!
>
>    When I generate patches using "git format-patch" it always makes
> my name garbled in the "From:" line
> as shown below. I'm using openSUSE 11.2 RC 1 (x86_64) with the
> following settings:
>
>        # locale charmap
>        UTF-8
>        # echo $LANG
>        en_US.UTF-8
>
>    I've tried changing my environment to use another encoding like
> ISO-8859-1, but it didn't work as well.
>
>    Does someone can explain why does this happens? Any suggestions?
>
> P.s.: the problem never occurs on the commit message (Signed-off-by)
>
>
>>> >From 584d9bfc7c1d41b76a05655b4562b98fcbef6ee4 Mon Sep 17 00:00:00 2001
>>> From: =?UTF-8?q?Andr=C3=A9=20Goddard=20Rosa?= <andre.goddard@gmail.com>
>>> Date: Sun, 1 Nov 2009 14:09:06 -0200
>>> Subject: [PATCH v2 7/7] vsprintf: factor out skip_space code in a
>>> separate function
>>> MIME-Version: 1.0
>>> Content-Type: text/plain; charset=UTF-8
>>> Content-Transfer-Encoding: 8bit

This is the normal encoding for email headers where you cannot use 8bit characters. You have to use a 7bit characters with this =?UTF-8... encoding.

You can check the From: line in your mail, the mail I'm replying:
From:	=?ISO-8859-1?Q?Andr=E9_Goddard_Rosa?= <andre.goddard@gmail.com>

At the other hand the tools using the output of git-format-patch must deal with this all, as they do. git-am handles it well, if not it's a bug that should be reported.

HTH, Santi

Previous: André Goddard RosaNext: André Goddard Rosa
Message 2 of 8 in “Problem with "From:" line on "git format-patch" generated patches”
  1. André Goddard RosaNov 3, 2009
  2. Santi BéjarNov 3, 2009
  3. André Goddard RosaNov 3, 2009
  4. André Goddard RosaNov 3, 2009
  5. Jonathan NiederNov 3, 2009
  6. André Goddard RosaNov 4, 2009
  7. Jeff KingNov 4, 2009
  8. André Goddard RosaNov 4, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.