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

Re: [PATCH] git-p4: preserve utf8 BOM when importing from p4 to git

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 14, 2022, 23:11 UTC
Message-ID
<xmqq1qp1wph5.fsf@gitster.g>
In-Reply-To
<CAPMMpoi=6x5VbSh=Lkbi7WJKudGpQS2U_GnJk8GJi+ArJNp2EA@mail.gmail.com>
Tao Klerks <tao@klerks.biz> writes:
Show 20 quoted lines
> Again, I'm not attempting to defend the breakage - just outlining why
> I don't see how "using the Perforce variable P4CHARSET" would solve
> anything.
>
>> This new behavior has made it impossible for
>> me to submit changes to files of type "utf8"!  Any attempt fails with
>> "patch does not apply" and the erroneously added BOM is the cause.
>
> I will try to understand the "unicode enabled server" behavior today
> or tomorrow and see what options might make sense.
>
>> I propose rolling back the patch that introduced this behavior,
>
> Junio is the expert here and has noted it's a little late for that. I
> obviously defer to his expertise as to git's release and backout
> strategy.
>
> I would like to have a go at understanding what the options are (how
> we can get correct and functional behavior for all users), before
> proposing a specific course of action.

It sounds like, if your conjecture turns out to be correct in that those P4 users who interact unicode enabled servers would have P4CHARSET and others don't, we may not need an extra configuration but pay attention to the P4CHARSET variable (or lack of it) and switch the behaviour.

Thanks for a well reasoned response.
Previous: Tao KlerksNext: Tao Klerks
Message 4 of 6 in “Re: [PATCH] git-p4: preserve utf8 BOM when importing from p4 to git”
  1. Tzadik VanderhoofDec 14, 2022
  2. Junio C HamanoDec 14, 2022
  3. Tao KlerksDec 14, 2022
  4. Junio C HamanoDec 14, 2022
  5. Tao KlerksDec 19, 2022
  6. Tao KlerksDec 22, 2022

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.