Re: [PATCH] t0021: make sure clean filter runs
From: Junio C Hamano <hidden>
Date: 2019-08-22 18:04:31
Thomas Gummerer [off-list ref] writes:
quoted
# 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' though, as I find it slightly easier to read (I had to go look up what the =-/=+ in 'test-tool chmtime' does, while I knew what touch would be doing :)
Yup, I do not quite get why people feel 'touch' is a bad idea here. I also think we should discourage "test-tool chmtime =<anything>" (i.e. set to relative to the timestamp read from time(), as opposed to relative to the timestamp read from the filesystem), when we can avoid it, to allow tests on remote filesystem where the filesystem clock and the system clock may not always be in sync.
That said that's a minor preference for me, if people have a strong opinion that test-tool chmtime is really better here I'm fine with changing it.