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/t0021-conversion.sh >>> +++ b/t/t0021-conversion.sh >>> @@ -390,6 +390,7 @@ test_expect_success PERL 'required process filter should filter data' ' >>> EOF >>> test_cmp_exclude_clean expected.log debug.log && >>> >>> + touch test.r && >> >> test-tool chmtime +10 test.r >> >> would be more reliable. > > Hmm, is touch unreliable on some platforms? I didn't think of > 'test-tool chmtime', but I'm also not sure it's better than touch in > this case. > > To me te 'touch' signifies that the timestamp must be updated after > the previous checkout, so git thinks it could possibly have been > changed, which I think is clearer in this case than setting the mtime > to a future time. touch does not guarantee that the current time is different from the timestamp that the file already carries, particularly not when the filesystem stores just a resolution of 1 second, and commands are executed quickly. But when we use test-tool chmtime +10, then the timestamp is definitely different. If you don't like a timestamp in the future, use -10, or anything else that is different from zero. -- Hannes