From: Linus Torvalds <torvalds@osdl.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Jakub Narebski <jnareb@gmail.com>, git@vger.kernel.org
Subject: Re: Re: Moving a directory into another fails
Date: Mon, 4 Dec 2006 12:51:08 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0612041246150.3476@woody.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0612041114240.3476@woody.osdl.org>
On Mon, 4 Dec 2006, Linus Torvalds wrote:
>
> If a filesystem cannot represent that name AS THAT BYTE SEQUENCE then the
> filesystem is broken. No ifs, buts, maybes about it. I'm sorry, but that's
> how it is.
Btw, what this means in practice is that when git creates a file with a
certain sequence of bytes, then
(a) readdir had better return _that_ sequence of bytes, or git will see
it as somethign else.
(b) opening it with that same sequence of bytes had better work.
This does not mean that a filesystem may not internally use some other
encoding. It just means that if the filesystem - when converting back and
forth between the internal encoding and the one it shows to user space -
had better convert back to the exact same thing.
Also, note that for most projects, even a broken filesystem doesn't
actually matter - it's enough that the filesystem gets the conversions
right for the particular set of names in a particular project. So any
project that just has 7-bit filenames will obviously never even see any
issues at all, even if the filesystem it runs on then does something
strange with 8-bit filenames.
This is one reason why UNIX's "everything is a stream of bytes" is so
important, and whyprograms should generally work with byte streams, not
"wide strings" or similar. It's the only way that you can reliably work
across different locales. Use wide strings and locale-specific stuff
_only_ for actually showing users something on the tty, for example.
next prev parent reply other threads:[~2006-12-04 20:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-26 15:00 Moving a directory into another fails Jon Smirl
2006-07-26 22:34 ` Nicolas Vilz
2006-07-26 23:03 ` Jon Smirl
2006-07-26 23:25 ` Nicolas Vilz
2006-07-28 1:43 ` Petr Baudis
2006-12-04 18:19 ` Stefan Pfetzing
2006-12-04 18:56 ` Jakub Narebski
2006-12-04 19:03 ` Johannes Schindelin
2006-12-04 19:10 ` Jakub Narebski
2006-12-04 19:10 ` Johannes Schindelin
2006-12-04 19:37 ` Jakub Narebski
[not found] ` <7617FA7E-D49A-4A4C-B033-C2CB20623F5F@wf227.com>
2006-12-04 21:01 ` Johannes Schindelin
2006-12-04 20:26 ` Linus Torvalds
2006-12-04 20:51 ` Linus Torvalds [this message]
2006-12-04 20:54 ` Shawn Pearce
2006-12-04 20:56 ` Jakub Narebski
2006-12-04 21:05 ` Johannes Schindelin
2006-12-04 21:23 ` Linus Torvalds
2006-12-05 7:34 ` Johannes Schindelin
2006-12-05 9:36 ` Jakub Narebski
2006-12-05 14:11 ` filesystem encodings and gitweb tests, was " Johannes Schindelin
2006-12-05 14:29 ` Jakub Narebski
2006-12-05 14:40 ` Johannes Schindelin
2006-12-05 17:11 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0612041246150.3476@woody.osdl.org \
--to=torvalds@osdl.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).