On 06/05/21 16.12, Mark Amery wrote:
• Above, Torsten mentions that there are filesystem-specific rules about what names are equal to each other that Git can't easily handle, because they go beyond just ASCII case changes. In that case, maybe the right solution is to always defer the question to the filesystem rather than Git trying to figure out the answer "in its head"? That is: first check the inode or file ID of the src and dst passed to `git mv`. If they are different and the second one is a folder, move src inside the existing folder. If either they are the same or the second one is not a folder, then do a rename. It seems to me that this approach automatically handles stuff like `git mv bär.txt bÄr.txt` plus any other rules about names being equal (like two different sequences of code points that both express "à"), all without Git ever needing to explicitly check whether two names are case-insensitively equal. Am I missing something?
On case when src and dst have different inodes and dst is a file, rather than a directory, mv will overwrite dst with contents of src (on Linux). -- An old man doll... just what I always wanted! - Clara