On Jan 16, 2008, at 4:51 PM, Jakub Narebski wrote:
It's not using different encodings, it's all Unicode. However, it
accepts different normalization variants of Unicode, since it can read
them all and it would be folly to require everybody to conform to its
own special internal variant. But it does have to normalize them,
otherwise how would it detect the same filename using different
normalizations? Also, it may seem strange to have different names
between reading and writing, but that's only if you think of the name
as a sequence of bytes - when treated as a sequence of characters, you
get the same result. In other words, you're used to filenames as
bytes, HFS+ treats filenames as strings.
Sure, it makes sense from a performance perspective, but it causes
problems with HFS+ and any other filesystem that behaves the same way.
In the previous discussion about case-sensitivity, somebody suggested
using a lookup table to map between git's internal representation and
the name the filesystem returns, which seems like a decent idea and
one that could be enabled with a config parameter to avoid penalizing
repos on other filesystems. But I don't know enough about the
internals of git to even think of trying to implement it myself.
--
Kevin Ballard
http://kevin.sb.orgkevin@sb.orghttp://www.tildesoft.com