Re: [PATCH v5] clone: report duplicate entries on case-insensitive filesystems
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Aug 17, 2018, 19:46 UTC
- Message-ID
- <20180817194600.GA10393@tor.lan>
- In-Reply-To
- <20180817161645.28249-1-pclouds@gmail.com>
On Fri, Aug 17, 2018 at 06:16:45PM +0200, Nguyễn Thái Ngọc Duy wrote:
The whole patch looks good to me. (I was just sending a different version, but your version is better :-)
One minor remark, should the line warning: the following paths have collided start with a capital letter: Warning: the following paths have collided
Show 19 quoted lines
> Paths that only differ in case work fine in a case-sensitive > filesystems, but if those repos are cloned in a case-insensitive one, > you'll get problems. The first thing to notice is "git status" will > never be clean with no indication what exactly is "dirty". > > This patch helps the situation a bit by pointing out the problem at > clone time. Even though this patch talks about case sensitivity, the > patch makes no assumption about folding rules by the filesystem. It > simply observes that if an entry has been already checked out at clone > time when we're about to write a new path, some folding rules are > behind this. > > In the case that we can't rely on filesystem (via inode number) to do > this check, fall back to fspathcmp() which is not perfect but should > not give false positives. > > This patch is tested with vim-colorschemes and Sublime-Gitignore > repositories on a JFS partition with case insensitive support on > Linux.
Now even tested under Mac OS/HFS+
[]
> ' > > +test_expect_success !MINGW,!CYGWIN,CASE_INSENSITIVE_FS 'colliding file detection' '
My ambition is to run the test under Windows (both CYGWIN and native) next week, so that we can remove !MINGW and !CYGWIN