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

[PATCH 0/2] git-p4: encoding of data from perforce

From
Andrew Oakley <andrew@adoakley.name>
Date
Apr 12, 2021, 08:52 UTC
Message-ID
<20210412085251.51475-1-andrew@adoakley.name>

When using python3, git-p4 fails to handle data from perforce which is not valid UTF-8. In large repositories it's very likely that such data will exist - perforce itself does no validation of the data by default.

Historically git-p4 has just passed whatever bytes it got from perforce into git. This seems like a sensible approach - git-p4 has no idea what encoding may have been used and it seems likely that different encodings are used within a repository.

I was trying to do a more thorough job, moving more of git-p4 over to using bytes. Unfortunately the changes end up being large and hard to review. In most cases it's probably sufficient to just avoid decoding the commit messages.

There have been a couple of previous proposals around trying to decode this data using a user-configured encoding: http://public-inbox.org/git/CAE5ih7-F9efsiV5AQmw3ocjiy+BT6ZAT5fA0Lx0OSkVTO8Kqjg@mail.gmail.com/T/ http://public-inbox.org/git/20210409153815.7joohvmlnh6itczc@tb-raspi4/T/

Next: Andrew Oakley
Message 1 of 13 in “git-p4: encoding of data from perforce”
  1. 0/2 git-p4: encoding of data from perforceAndrew Oakley, Apr 12, 2021
  2. 2/2 git-p4: do not decode data from perforce by defaultAndrew Oakley, Apr 12, 2021
  3. Tzadik VanderhoofApr 29, 2021
  4. Andrew OakleyApr 30, 2021
  5. Luke DiamandApr 30, 2021
  6. Tzadik VanderhoofApr 30, 2021
  7. Andrew OakleyMay 4, 2021
  8. Tzadik VanderhoofMay 4, 2021
  9. Junio C HamanoMay 5, 2021
  10. Tzadik VanderhoofMay 5, 2021
  11. Tzadik VanderhoofMay 5, 2021
  12. Junio C HamanoMay 5, 2021
  13. 1/2 git-p4: avoid decoding more data from perforceAndrew Oakley, Apr 12, 2021

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.