[PATCH v2 7/7] wildmatch test: create & test files on disk in addition to in-memory

2017-12-24 Thread Ævar Arnfjörð Bjarmason
There has never been any full roundtrip testing of what git-ls-files and other functions that use wildmatch() actually do, rather we've been satisfied with just testing the underlying C function. Due to git-ls-files and friends having their own codepaths before they call wildmatch() there's someti

Re: [PATCH v2 7/7] wildmatch test: create & test files on disk in addition to in-memory

2017-12-25 Thread Johannes Sixt
Am 25.12.2017 um 01:28 schrieb Ævar Arnfjörð Bjarmason: +create_test_file() { + file=$1 + + case $file in + # `touch .` will succeed but obviously not do what we intend + # here. + ".") + return 1 + ;; + # We cannot create a file wit

Re: [PATCH v2 7/7] wildmatch test: create & test files on disk in addition to in-memory

2017-12-27 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > + # Turn foo/bar/baz into foo/bar to create foo/bar as a > + # directory structure. > + dirs=$(echo "$file" | sed -r 's!/[^/]+$!!') Let's not limit this script to GNUism systems. You want to see if $file has a slash followed by one or more non-slas

Re: [PATCH v2 7/7] wildmatch test: create & test files on disk in addition to in-memory

2018-01-03 Thread Adam Dinwoodie
On Monday 25 December 2017 at 12:28 am +, Ævar Arnfjörð Bjarmason wrote: > There has never been any full roundtrip testing of what git-ls-files > and other functions that use wildmatch() actually do, rather we've > been satisfied with just testing the underlying C function. > > Due to git-ls-f

Re: [PATCH v2 7/7] wildmatch test: create & test files on disk in addition to in-memory

2018-01-03 Thread Ævar Arnfjörð Bjarmason
On Wed, Jan 03 2018, Adam Dinwoodie jotted: > On Monday 25 December 2017 at 12:28 am +, Ævar Arnfjörð Bjarmason wrote: >> There has never been any full roundtrip testing of what git-ls-files >> and other functions that use wildmatch() actually do, rather we've >> been satisfied with just test

Re: [PATCH v2 7/7] wildmatch test: create & test files on disk in addition to in-memory

2018-01-03 Thread Adam Dinwoodie
On Wednesday 03 January 2018 at 02:31 pm +0100, Ævar Arnfjörð Bjarmason wrote: > > On Wed, Jan 03 2018, Adam Dinwoodie jotted: > > > On Monday 25 December 2017 at 12:28 am +, Ævar Arnfjörð Bjarmason wrote: > >> There has never been any full roundtrip testing of what git-ls-files > >> and othe

Re: [PATCH v2 7/7] wildmatch test: create & test files on disk in addition to in-memory

2018-01-03 Thread Ævar Arnfjörð Bjarmason
On Wed, Jan 03 2018, Adam Dinwoodie jotted: > On Wednesday 03 January 2018 at 02:31 pm +0100, Ævar Arnfjörð Bjarmason wrote: >> >> On Wed, Jan 03 2018, Adam Dinwoodie jotted: >> >> > On Monday 25 December 2017 at 12:28 am +, Ævar Arnfjörð Bjarmason >> > wrote: >> >> There has never been any

Re: [PATCH v2 7/7] wildmatch test: create & test files on disk in addition to in-memory

2018-01-04 Thread Adam Dinwoodie
On Wednesday 03 January 2018 at 08:14 pm +0100, Ævar Arnfjörð Bjarmason wrote: > > On Wed, Jan 03 2018, Adam Dinwoodie jotted: > > > On Wednesday 03 January 2018 at 02:31 pm +0100, Ævar Arnfjörð Bjarmason > > wrote: > >> Does the fixup above in <878tdm8k2d@evledraar.gmail.com> work for > >>