From: Bagas Sanjaya Date: Thu, 06 May 2021 13:11:10 GMT Subject: Re: Bug: Changing folder case with `git mv` crashes on case-insensitive file system Message-ID: <15ba96cb-c682-f6d2-0bc2-eee4094c243c@gmail.com> In-Reply-To: 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