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

Re: Re: Moving a directory into another fails

From
Linus Torvalds <torvalds@osdl.org>
Date
Dec 4, 2006, 21:23 UTC
Message-ID
<Pine.LNX.4.64.0612041317480.3476@woody.osdl.org>
In-Reply-To
<Pine.LNX.4.63.0612042201420.28348@wbgn013.biozentrum.uni-wuerzburg.de>
On Mon, 4 Dec 2006, Johannes Schindelin wrote:
> 
> The issue was _not_ locale-dependent trees, but file systems which 
> _change_ the encoding.

Correct. However, it doesn't really change the issue: some byte streams may simply not work in certain encodings.

You could, of course, basically do some kind of "escape high characters" on the filename if it has characters in it that you suspect might cause problems, but you'd better make 100% sure that it really is 100% reversible (and you need to do all the real operations on the _native_git_ version of the filename).

So we _could_ use a flag that says "escape all filenames", but it would not be a _locale_ setting, it would really be a per-repository setting, and it wouldn't be "iconv", it would be something similar to what we do for "git diff" when we escape filenames with strange characters in them.

We could do it by changing ever "open()/creat()" and "[l]stat()" on the working tree with somethign that first escapes the filename.

Then, people with broken filesystems could set
	[core]
		escapefilenames = true

and instead of seeing 8-bit filenames, they'd see filenames with 7 bits and escapes. They could work with such a repo, for sure. It would be ugly as hell, though.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 17 of 24 in “Moving a directory into another fails”
  1. Jon SmirlJul 26, 2006
  2. Nicolas VilzJul 26, 2006
  3. Jon SmirlJul 26, 2006
  4. Nicolas VilzJul 26, 2006
  5. Petr BaudisJul 28, 2006
  6. Stefan PfetzingDec 4, 2006
  7. Jakub NarebskiDec 4, 2006
  8. Johannes SchindelinDec 4, 2006
  9. Jakub NarebskiDec 4, 2006
  10. Johannes SchindelinDec 4, 2006
  11. Jakub NarebskiDec 4, 2006
  12. Linus TorvaldsDec 4, 2006
  13. Linus TorvaldsDec 4, 2006
  14. Shawn PearceDec 4, 2006
  15. Jakub NarebskiDec 4, 2006
  16. Johannes SchindelinDec 4, 2006
  17. Linus TorvaldsDec 4, 2006
  18. Johannes SchindelinDec 5, 2006
  19. Jakub NarebskiDec 5, 2006
  20. filesystem encodings and gitweb tests, was Re: Moving a directory into another failsJohannes Schindelin, Dec 5, 2006
  21. Jakub NarebskiDec 5, 2006
  22. Johannes SchindelinDec 5, 2006
  23. Linus TorvaldsDec 5, 2006
  24. Johannes SchindelinDec 4, 2006

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.