Re: Re: Moving a directory into another fails

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Monday, December 4, 2006 - 2:23 pm

On Mon, 4 Dec 2006, Johannes Schindelin wrote:

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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Re: Moving a directory into another fails, Jakub Narebski, (Mon Dec 4, 12:10 pm)
Re: Re: Moving a directory into another fails, Johannes Schindelin, (Mon Dec 4, 12:10 pm)
Re: Re: Moving a directory into another fails, Linus Torvalds, (Mon Dec 4, 1:26 pm)
Re: Re: Moving a directory into another fails, Linus Torvalds, (Mon Dec 4, 1:51 pm)
Re: Re: Moving a directory into another fails, Shawn Pearce, (Mon Dec 4, 1:54 pm)
Re: Moving a directory into another fails, Jakub Narebski, (Mon Dec 4, 1:56 pm)
Re: Re: Moving a directory into another fails, Johannes Schindelin, (Mon Dec 4, 2:05 pm)
Re: Re: Moving a directory into another fails, Linus Torvalds, (Mon Dec 4, 2:23 pm)
Re: Re: Moving a directory into another fails, Johannes Schindelin, (Tue Dec 5, 12:34 am)
Re: Moving a directory into another fails, Jakub Narebski, (Tue Dec 5, 2:36 am)
filesystem encodings and gitweb tests, was Re: Moving a di ..., Johannes Schindelin, (Tue Dec 5, 7:11 am)
Re: filesystem encodings and gitweb tests, was Re: Moving ..., Johannes Schindelin, (Tue Dec 5, 7:40 am)
Re: Re: Moving a directory into another fails, Linus Torvalds, (Tue Dec 5, 10:11 am)