Re: Re: Moving a directory into another fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]