Re: [PATCH v1] name-hash: properly fold directory names in adjust_dirname_case()

2018-02-08 Thread Junio C Hamano
Torsten Bögershausen writes: > My personal favorite would be to spell out what we expect and run a diff. > When it fails, we can see what fails, and the function would look > like this: I'd rather not to have the "sort" there; output from ls-files is meant to be stable; passing

Re: [PATCH v1] name-hash: properly fold directory names in adjust_dirname_case()

2018-02-08 Thread Junio C Hamano
Ben Peart writes: > Correct the pointer arithmetic in adjust_dirname_case() so that it calls > find_dir_entry() with the correct string length. Previously passing in > "dir1/foo" would pass a length of 6 instead of the correct 4. This resulted > in > find_dir_entry()

Re: [PATCH v1] name-hash: properly fold directory names in adjust_dirname_case()

2018-02-08 Thread Ben Peart
On 2/8/2018 12:21 PM, Torsten Bögershausen wrote: On Wed, Feb 07, 2018 at 07:41:56PM -0500, Ben Peart wrote: [] diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh index b29d749bb7..219c96594c 100755 --- a/t/t0050-filesystem.sh +++ b/t/t0050-filesystem.sh @@ -80,7 +80,17 @@

Re: [PATCH v1] name-hash: properly fold directory names in adjust_dirname_case()

2018-02-08 Thread Torsten Bögershausen
On Wed, Feb 07, 2018 at 07:41:56PM -0500, Ben Peart wrote: [] > diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh > index b29d749bb7..219c96594c 100755 > --- a/t/t0050-filesystem.sh > +++ b/t/t0050-filesystem.sh > @@ -80,7 +80,17 @@ test_expect_success 'merge (case change)' ' > git

Re: [PATCH v1] name-hash: properly fold directory names in adjust_dirname_case()

2018-02-07 Thread David Turner
On Wed, 2018-02-07 at 19:41 -0500, Ben Peart wrote: > Correct the pointer arithmetic in adjust_dirname_case() so that it > calls > find_dir_entry() with the correct string length. Previously passing > in > "dir1/foo" would pass a length of 6 instead of the correct 4. This > resulted in >

[PATCH v1] name-hash: properly fold directory names in adjust_dirname_case()

2018-02-07 Thread Ben Peart
Correct the pointer arithmetic in adjust_dirname_case() so that it calls find_dir_entry() with the correct string length. Previously passing in "dir1/foo" would pass a length of 6 instead of the correct 4. This resulted in find_dir_entry() never finding the entry and so the subsequent memcpy