Re: [PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-16 Thread Junio C Hamano
Torsten Bögershausen writes: > check_stat is 0 on Windows, and inum is allways 0 in lstat(). > I was thinking about systems which don't have inodes and inum, > and then generate an inum in memory, sometimes random. > After a reboot or a re-mount of the file systems those ino values > change. >

Re: [PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-16 Thread Duy Nguyen
On Thu, Aug 16, 2018 at 4:03 PM Torsten Bögershausen wrote: > check_stat is 0 on Windows, How? check_stat is 1 by default. And "git init" does not add this key on new repos. > Now back to the compiler switch: > Windows always set inum to 0 and I can't think about a situation where > a file in a

Re: [PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-16 Thread Torsten Bögershausen
On Wed, Aug 15, 2018 at 12:38:49PM -0700, Junio C Hamano wrote: This should answer Duys comments as well. > Torsten Bögershausen writes: > [snip] > > Should the following be protected by core.checkstat ? > > if (check_stat) { > > I do not think such a if statement is strictly necessary. >

Re: [PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-15 Thread Junio C Hamano
Torsten Bögershausen writes: >> + >> +#if !defined(GIT_WINDOWS_NATIVE) /* inode is always zero on Windows */ >> +for (i = 0; i < state->istate->cache_nr; i++) { >> +struct cache_entry *dup = state->istate->cache[i]; >> + >> +if (dup == ce) >> +

Re: [PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 9:08 PM Torsten Bögershausen wrote: > > +#if !defined(GIT_WINDOWS_NATIVE) /* inode is always zero on Windows */ > > + for (i = 0; i < state->istate->cache_nr; i++) { > > + struct cache_entry *dup = state->istate->cache[i]; > > + > > + if (dup ==

Re: [PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-15 Thread Torsten Bögershausen
On Sun, Aug 12, 2018 at 11:07:14AM +0200, Nguyễn Thái Ngọc Duy wrote: > 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

Re: [PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-13 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > 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".

Re: [PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-13 Thread Jeff Hostetler
On 8/12/2018 5:07 AM, Nguyễn Thái Ngọc Duy wrote: 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

[PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-12 Thread Nguyễn Thái Ngọc Duy
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