Re: Git clone and case sensitivity

2018-07-31 Thread Jeff Hostetler
On 7/29/2018 5:28 AM, Jeff King wrote: On Sun, Jul 29, 2018 at 07:26:41AM +0200, Duy Nguyen wrote: strcasecmp() will only catch a subset of the cases. We really need to follow the same folding rules that the filesystem would. True. But that's how we handle case insensitivity internally.

Re: Git clone and case sensitivity

2018-07-29 Thread Jeff King
On Sun, Jul 29, 2018 at 07:26:41AM +0200, Duy Nguyen wrote: > > strcasecmp() will only catch a subset of the cases. We really need to > > follow the same folding rules that the filesystem would. > > True. But that's how we handle case insensitivity internally. If a > filesytem has more

Re: Git clone and case sensitivity

2018-07-28 Thread Duy Nguyen
On Sat, Jul 28, 2018 at 11:57 AM Jeff King wrote: > > +static int has_duplicate_icase_entries(struct index_state *istate) > > +{ > > + struct string_list list = STRING_LIST_INIT_NODUP; > > + int i; > > + int found = 0; > > + > > + for (i = 0; i < istate->cache_nr; i++) > > +

Re: Git clone and case sensitivity

2018-07-28 Thread brian m. carlson
On Sat, Jul 28, 2018 at 05:56:59AM -0400, Jeff King wrote: > strcasecmp() will only catch a subset of the cases. We really need to > follow the same folding rules that the filesystem would. > > For the case of clone, I actually wonder if we could detect during the > checkout step that a file

Re: Git clone and case sensitivity

2018-07-28 Thread Jeff King
On Sat, Jul 28, 2018 at 07:11:05AM +0200, Duy Nguyen wrote: > > It might be enough to just issue a warning and give an advise() hint > > that tells the user what's going on. Then they can decide what to do > > (hide both paths, or just work in the index, or move to a different fs, > > or complain

Re: Git clone and case sensitivity

2018-07-28 Thread Simon Ruderich
On Sat, Jul 28, 2018 at 07:11:05AM +0200, Duy Nguyen wrote: > static int checkout(int submodule_progress) > { > struct object_id oid; > @@ -761,6 +785,11 @@ static int checkout(int submodule_progress) > if (write_locked_index(_index, _file, COMMIT_LOCK)) > die(_("unable

Re: Git clone and case sensitivity

2018-07-27 Thread Duy Nguyen
On Sat, Jul 28, 2018 at 12:48:57AM -0400, Jeff King wrote: > On Sat, Jul 28, 2018 at 06:45:43AM +0200, Duy Nguyen wrote: > > > > I agree throwing a real exception would be bad. But how about detecting > > > the problem and trying our best to keep the repo in somewhat usable > > > state like this?

Re: Git clone and case sensitivity

2018-07-27 Thread Jeff King
On Sat, Jul 28, 2018 at 06:45:43AM +0200, Duy Nguyen wrote: > > I agree throwing a real exception would be bad. But how about detecting > > the problem and trying our best to keep the repo in somewhat usable > > state like this? > > > > This patch uses sparse checkout to hide all those paths that

Re: Git clone and case sensitivity

2018-07-27 Thread Duy Nguyen
On Sat, Jul 28, 2018 at 6:36 AM Duy Nguyen wrote: > > On Fri, Jul 27, 2018 at 08:59:09PM +, brian m. carlson wrote: > > On Fri, Jul 27, 2018 at 11:59:33AM +0200, Paweł Paruzel wrote: > > > Hi, > > > > > > Lately, I have been wondering why my test files in repo are modified > > > after I clone

Re: Git clone and case sensitivity

2018-07-27 Thread Duy Nguyen
On Fri, Jul 27, 2018 at 08:59:09PM +, brian m. carlson wrote: > On Fri, Jul 27, 2018 at 11:59:33AM +0200, Paweł Paruzel wrote: > > Hi, > > > > Lately, I have been wondering why my test files in repo are modified > > after I clone it. It turned out to be two files: boolStyle_t_f and > >

Re: Git clone and case sensitivity

2018-07-27 Thread brian m. carlson
On Fri, Jul 27, 2018 at 11:59:33AM +0200, Paweł Paruzel wrote: > Hi, > > Lately, I have been wondering why my test files in repo are modified > after I clone it. It turned out to be two files: boolStyle_t_f and > boolStyle_T_F. > The system that pushed those files was case sensitive while my mac

Git clone and case sensitivity

2018-07-27 Thread Paweł Paruzel
Hi, Lately, I have been wondering why my test files in repo are modified after I clone it. It turned out to be two files: boolStyle_t_f and boolStyle_T_F. The system that pushed those files was case sensitive while my mac after High Sierra update had APFS which is by default case-insensitive. I