From: Junio C Hamano <email@example.com> To: Mark Amery <firstname.lastname@example.org> Cc: "Torsten Bögershausen" <email@example.com>, firstname.lastname@example.org Subject: Re: Bug: Changing folder case with `git mv` crashes on case-insensitive file system Date: Fri, 07 May 2021 06:03:21 +0900 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <CAD8jeghZKDcp=weHtcMZ4z8KaO1jQJqfPqaRtYgtiwrX-1+NNg@mail.gmail.com> (Mark Amery's message of "Thu, 6 May 2021 10:12:40 +0100") Mark Amery <firstname.lastname@example.org> writes: > 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? > > Sorry if any of the above is dumb or if I'm reiterating things others > have already said without realising it. There is nothing dumb about the idea. I think that is essentially what brian and I outlined in the earlier exchange, except that we need to use something other than inum on Windows to decide if two pathnames refer to the same filesystem entity, and the approach we suggested was to use the inum-based check _after_ seeing the current code fail with EINVAL in the error codepath, instead of doing so upfront. Thanks.
prev parent reply other threads:[~2021-05-06 21:03 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-03 17:25 Mark Amery 2021-05-03 22:58 ` brian m. carlson 2021-05-04 3:46 ` Junio C Hamano 2021-05-04 11:20 ` brian m. carlson 2021-05-05 13:51 ` Johannes Schindelin 2021-05-06 0:38 ` Junio C Hamano 2021-05-04 15:19 ` Torsten Bögershausen 2021-05-05 0:23 ` Junio C Hamano 2021-05-05 2:12 ` brian m. carlson 2021-05-06 4:34 ` Torsten Bögershausen 2021-05-06 9:12 ` Mark Amery 2021-05-06 13:11 ` Bagas Sanjaya 2021-05-06 14:53 ` Torsten Bögershausen 2021-05-06 21:03 ` Junio C Hamano [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: Bug: Changing folder case with `git mv` crashes on case-insensitive file system' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).