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

Re: What's cooking in git.git (Jul 2009, #01; Mon, 06)

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jul 7, 2009, 22:13 UTC
Message-ID
<alpine.LFD.2.01.0907071504540.3210@localhost.localdomain>
In-Reply-To
<81b0412b0907071257q14bb544dp99846f2a35fbada2@mail.gmail.com>
On Tue, 7 Jul 2009, Alex Riesen wrote:
> 
> Maybe we could at least let the user save the encoding of file names
> in the tree objects somehow?

There's no place to really sanely save it in a tree, nor is there really even any way to figure the right encoding out. In fact, one of the problems with non-utf encodings is that in theory people could literally be mixing different encodings in one tree (imagine test-suites etc).

There's a reason why the only _sane_ model is to use an encoding that is universal.

So we could in theory save an encoding in the commit, but quite frankly, it's unlikely that we could use it sanely. Nobody is ever going to write a sane merge that will merge across different encodings. So realistically, you're going to have a single encoding not per tree, or per commit, but for the whole project.

And then when you get fed up with Latin1 or Shift-JIS or whatever crazy sh*t people are still using, you use fast-export + script + fast-import, and change the encoding for the whole repository that way. Exactly because doing it at a smaller granularity is a total pain in the *ss.

			Linus
Previous: Alex RiesenNext: Johannes Schindelin
Message 12 of 20 in “What's cooking in git.git (Jul 2009, #01; Mon, 06)”
  1. Junio C HamanoJul 6, 2009
  2. Marcus CamenJul 6, 2009
  3. Junio C HamanoJul 6, 2009
  4. Marcus CamenJul 6, 2009
  5. Junio C HamanoJul 6, 2009
  6. Jakub NarebskiJul 6, 2009
  7. Mark LodatoJul 7, 2009
  8. Jeff KingJul 7, 2009
  9. Johannes SixtJul 7, 2009
  10. Linus TorvaldsJul 7, 2009
  11. Alex RiesenJul 7, 2009
  12. Linus TorvaldsJul 7, 2009
  13. Johannes SchindelinJul 7, 2009
  14. Shawn O. PearceJul 7, 2009
  15. Junio C HamanoJul 7, 2009
  16. Shawn O. PearceJul 7, 2009
  17. notes, was Re: What's cooking in git.git (Jul 2009, #01; Mon, 06)Johannes Schindelin, Jul 8, 2009
  18. Stephen BoydJul 8, 2009
  19. Johannes SixtJul 8, 2009
  20. Christian CouderJul 10, 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.