Re: [PATCH] t0021: make sure clean filter runs

2019-08-22 Thread Johannes Sixt
Am 22.08.19 um 19:49 schrieb Thomas Gummerer: > Right, the above is why I think 'touch' is a good idea here. Short of > system clocks jumping around, which will most likely break more than > this test anyway it guarantees that the timestamp is equal or greater > than the timestamp of the index, wh

Re: [PATCH] t0021: make sure clean filter runs

2019-08-22 Thread Junio C Hamano
Thomas Gummerer writes: >> # Make sure that the file appears dirty, so checkout below has to >> # run the configured filter. >> test-tool chmtime =-10 .git/index && >> test-tool chmtime =+0 test.r && > > I think the comment is a good idea. I personally still prefer just > using 'touch' t

Re: [PATCH] t0021: make sure clean filter runs

2019-08-22 Thread Thomas Gummerer
On 08/22, SZEDER Gábor wrote: > On Wed, Aug 21, 2019 at 08:23:23PM +0200, Johannes Sixt wrote: > > Am 21.08.19 um 16:56 schrieb Thomas Gummerer: > > > On 08/20, Johannes Sixt wrote: > > >> Am 20.08.19 um 08:56 schrieb Thomas Gummerer: > > >>> Fix the test by updating the mtime of test.r, ... > > >>

Re: [PATCH] t0021: make sure clean filter runs

2019-08-21 Thread SZEDER Gábor
On Wed, Aug 21, 2019 at 08:23:23PM +0200, Johannes Sixt wrote: > Am 21.08.19 um 16:56 schrieb Thomas Gummerer: > > On 08/20, Johannes Sixt wrote: > >> Am 20.08.19 um 08:56 schrieb Thomas Gummerer: > >>> Fix the test by updating the mtime of test.r, ... > >> > >>> diff --git a/t/t0021-conversion.sh

Re: [PATCH] t0021: make sure clean filter runs

2019-08-21 Thread Johannes Sixt
Am 21.08.19 um 16:56 schrieb Thomas Gummerer: > On 08/20, Johannes Sixt wrote: >> Am 20.08.19 um 08:56 schrieb Thomas Gummerer: >>> Fix the test by updating the mtime of test.r, ... >> >>> diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh >>> index e10f5f787f..66f75005d5 100755 >>> --- a/t

Re: [PATCH] t0021: make sure clean filter runs

2019-08-21 Thread Junio C Hamano
Thomas Gummerer writes: > It will also check the contents if the mtime is greater than the > timestamp of the index, so the 'touch' here would also cover that. > > So the changes here do solve the race completely. OK, the explanation makes sense. Either test.r has been correctly checked out and

Re: [PATCH] t0021: make sure clean filter runs

2019-08-21 Thread Thomas Gummerer
On 08/20, Johannes Sixt wrote: > Am 20.08.19 um 08:56 schrieb Thomas Gummerer: > > Fix the test by updating the mtime of test.r, ... > > > diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh > > index e10f5f787f..66f75005d5 100755 > > --- a/t/t0021-conversion.sh > > +++ b/t/t0021-conversion

Re: [PATCH] t0021: make sure clean filter runs

2019-08-21 Thread Thomas Gummerer
On 08/20, Junio C Hamano wrote: > Thomas Gummerer writes: > > > Fix the test by updating the mtime of test.r, so git is forced to > > check the contents of the file, and the clean filter is run as the > > test expects. > > Hmph, depending on the timestamp granularity, with this patch, > test.r w

Re: [PATCH] t0021: make sure clean filter runs

2019-08-20 Thread Johannes Sixt
Am 20.08.19 um 08:56 schrieb Thomas Gummerer: > Fix the test by updating the mtime of test.r, ... > diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh > index e10f5f787f..66f75005d5 100755 > --- a/t/t0021-conversion.sh > +++ b/t/t0021-conversion.sh > @@ -390,6 +390,7 @@ test_expect_success

Re: [PATCH] t0021: make sure clean filter runs

2019-08-20 Thread Junio C Hamano
Thomas Gummerer writes: > Fix the test by updating the mtime of test.r, so git is forced to > check the contents of the file, and the clean filter is run as the > test expects. Hmph, depending on the timestamp granularity, with this patch, test.r would have mtime that is the same or a bit later

[PATCH] t0021: make sure clean filter runs

2019-08-19 Thread Thomas Gummerer
In t0021.15 one of the things we are checking is that the clean filter is run when checking out empty-branch. The clean filter needs to be run to make sure there are no modifications on the file system for the test.r file, and thus it isn't dangerous to overwrite it. However in the current test s