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

Re: [PATCH v3 1/2] git-p4: add test case for "Translation of file content failed" error

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 21, 2015, 17:41 UTC
Message-ID
<xmqqzj0facvr.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<4DB8A17D-A670-4E84-8FA8-9B05F2DCE1CB@gmail.com>
Lars Schneider <larsxschneider@gmail.com> writes:
Show 21 quoted lines
> On 20 Sep 2015, at 23:16, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
>> On Sun, Sep 20, 2015 at 12:22 PM,  <larsxschneider@gmail.com> wrote:
>>> A P4 repository can get into a state where it contains a file with
>>> type UTF-16 that does not contain a valid UTF-16 BOM. If git-p4
>>> attempts to retrieve the file then the process crashes with a
>>> "Translation of file content failed" error.
>> 
>> Hmm, are these tests going to succeed only after patch 2/2 is applied?
>> If so, the order of these patches is backward since you want each
>> patch to be able to stand on its own and not introduce any sort of
>> breakage.
> Yes, these tests succeed only after 2/2. I think I saw this approach
> somewhere in the Git history. I thought it would ease the reviewing
> process: show the problem in the first commit, fix it in a subsequent
> commit.
> However, I understand your point as 1/2 would break the build.
>
> What is the preferred way by the Git community? Combine patch and test
> in one commit or a patch commit followed by a test commit? I would
> prefer to have everything in one commit.

A single patch is fine and usually preferable when the patch does not span all over the tree.

Previous: Luke DiamandNext: Luke Diamand
Message 7 of 12 in “git-p4: handle "Translation of file content failed"”
  1. 0/2 git-p4: handle "Translation of file content failed"larsxschneider@gmail.com, Sep 20, 2015
  2. 1/2 git-p4: add test case for "Translation of file content failed" errorlarsxschneider@gmail.com, Sep 20, 2015
  3. Eric SunshineSep 20, 2015
  4. Lars SchneiderSep 20, 2015
  5. Eric SunshineSep 20, 2015
  6. Luke DiamandSep 21, 2015
  7. Junio C HamanoSep 21, 2015
  8. Luke DiamandSep 21, 2015
  9. Lars SchneiderSep 21, 2015
  10. Torsten BögershausenSep 21, 2015
  11. Junio C HamanoSep 21, 2015
  12. 2/2 git-p4: handle "Translation of file content failed"larsxschneider@gmail.com, Sep 20, 2015

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.