"Reece Dunn" <msclrhd@xxxxxxxxxxxxxx> writes: > 1. File name representation > > For Linux file systems ... > Therefore, you have: > > os_to_git_path( const NATIVECHAR * ospath, strbuf * gitpath ); > git_to_os_path( const char * gitpath, const NATIVECHAR * ospath, int oslen ); It is not that simple, I am afraid. Legacy encodings can be used in pathnames. With bog-standard traditional UNIX pathname semantics, all pathnames are sequences of non-NUL, non-slash bytes, separated with slashes, so if you do not allow choices (which is a very sensible ideal world scenario), you can declare that the "git" encoding is UTF-8 and always check things out as-is. But if you want a project ("git" in your above parlance) to be checked out in two repositories, one with legacy and the other with UTF-8, you cannot just say os_to_git/git_to_os. You would need a bit more information from the repository owners what encodings are suitable. So your os_to_git()/git_to_os() will not be an identity function even on Linux to support such. I used to have a data directory on my Linux box with EUC-JP pathname and exported as an SMB share to my wife's Windows box, telling samba to transliterate to whatever encoding the other end liked. I did not want to have the pathname on the Linux end in UTF-8 because I did not have enough energey to update my Emacs configuration to grok Japanese in UTF-8 (even though I finally bit the bullet and switched to UTF-8 on the Linux side recently). I know, this is painful. Real life hurts. Even on Linux, not everybody can live in UTF-8-only world. > 2. Case (in)sensitivity > > Here, you have the following cases: > ... > 3. git says that the files are different, but the filesystem says > that the files are the same. > > Allow the move, updating the git directory tree only. Sorry, I cannot really tell what you are talking about. You seem to imply, with "Allow the move", that you are describing a scenario that involves a move of one existing file to another, but it is not clear. E.g. did you mean, by 3, "When the user says 'move a b', and if git says a and b are different but if the filesystem says a and b are the same, then..."? - 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