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

Re: git-rebase is ignoring working-tree-encoding

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Nov 4, 2018, 18:38 UTC
Message-ID
<20181104183813.GJ731755@genre.crustytoothpaste.net>
In-Reply-To
<CADN+U_Nw5wCyK1SPRgsxzFbJ-KKnOV2Ub8YA3_a80SZYwKC5FQ@mail.gmail.com>
On Sun, Nov 04, 2018 at 05:37:09PM +0100, Adrián Gimeno Balaguer wrote:
Show 12 quoted lines
> I wrote a "counterpart" easy fix which instead only prohibites BOM for
> the opposite endianness (for example if
> working-tree-encoding=UTF-16LE, then finding an UTF-16BE BOM in the
> file would cause Git to signal the error right before committing,
> diffing, etc.). That way user would be encouraged to modify the file's
> encoding to match the one specified in working-tree-encoding before
> allowing these actions, therefore preventing Git from encoding to the
> wrong endianness after file is written out. With few repository tests,
> this new behaviour worked as expected. But then I realized this
> solution would perhaps be unacceptable for Git's source code as it
> would violate that Unicode standard. Anyways, here is a PR in my Git
> fork with the changes I did, for reference:

I actually think such a solution (although I haven't looked at your patch) would be fine, and I would encourage you to send it to the list. It's my understanding that many people on Windows want to write things in UTF-16 encoding but only little-endian with a BOM. Allowing them to write that, even if Git won't be able to guarantee producing that, would be fine, as long as the data is what we expect.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Adrián Gimeno BalaguerNext: Torsten Bögershausen
Message 4 of 25 in “git-rebase is ignoring working-tree-encoding”
  1. Adrián Gimeno BalaguerNov 2, 2018
  2. brian m. carlsonNov 4, 2018
  3. Adrián Gimeno BalaguerNov 4, 2018
  4. brian m. carlsonNov 4, 2018
  5. Torsten BögershausenNov 4, 2018
  6. Adrián Gimeno BalaguerNov 5, 2018
  7. Torsten BögershausenNov 5, 2018
  8. Torsten BögershausenNov 6, 2018
  9. Adrián Gimeno BalaguerNov 7, 2018
  10. Torsten BögershausenNov 8, 2018
  11. Alexandre GrigorievDec 26, 2018
  12. brian m. carlsonDec 26, 2018
  13. Alexandre GrigorievDec 27, 2018
  14. Torsten BögershausenDec 27, 2018
  15. Alexandre GrigorievDec 23, 2018
  16. 1/1 Support working-tree-encoding "UTF-16LE-BOM"tboegi@web.de, Dec 29, 2018
  17. 1/1 Support working-tree-encoding "UTF-16LE-BOM"tboegi@web.de, Jan 20, 2019
  18. Junio C HamanoJan 22, 2019
  19. 1/1 Support working-tree-encoding "UTF-16LE-BOM"tboegi@web.de, Jan 30, 2019
  20. Jason PyeronJan 30, 2019
  21. Torsten BögershausenJan 30, 2019
  22. 1/1 gitattributes.txt: fix typotboegi@web.de, Mar 6, 2019
  23. Junio C HamanoMar 7, 2019
  24. Adrián Gimeno BalaguerDec 29, 2018
  25. Philip OakleyDec 29, 2018

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.