So? That's why I said "match", not "compare for identity".
To be a little bit more precise: I think a viable plan would be to
- have a config switch which determines what type of filename mangling we
allow the host OS to perform (Unicode "normalisation", case mongering),
and leave _everybody_ alone who left that switch unset,
- "overload" readdir() (by the famous git_X(); #define X git_X trick),
- have the overloaded readdir() _know_ which is the current prefix, and
load the index if it has not yet been loaded (but probably into a static
variable to avoid reloading, and to avoid interfering with the global
"cache" instance).
It _could_ be wise to store the "normalised" forms at one stage (instead
of the index) to speed up comparison -- the prefix has to be normalised
for readdir()s purposes, too, then.
This is possible with the HFS+ problem, since we know exactly how HFS+
tries to "help", and for case insensitivity too, I think. But it may be
restricting ourselves for other filename "equivalences" we might want to
handle one day.
BTW: I cannot think of anything else than readdir() which should have the
"problem" of reading back a name that the user did not specify. What am I
missing?
No. I think that would be a serious mistake. If you add a file on MacOSX
(with a _mangled_ filename, think of "git add ."), git should not try to
be as clever as HFS+ and "remangle" it.
It _is_ UTF-8, so what's the problem?
As for the HFS+ specfic conversion: like the CRLF issue, I am opposed to
have a "solution" affecting other people than those on broken system. So
I very much _want_ it to be an HFS+ specific conversion.
Exactly.
Ciao,
Dscho
-
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